-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--stderr=/dev/fd/1 doesn't work #44
Comments
@gollux any idea or workaround? Thanks! |
In fact, it works, but in a somewhat unexpected way: you really get both fd 1 and fd 2 pointing to the same file, but each fd has its own position in the file, so the echo'ed strings are overwriting one another. Cloning the fd would have more sense, wouldn't it? |
That's what the code was doing before, yeah, but now I'm not sure what would be a good way to have the same feature again from the outside, especially with all the permission/setuid stuff that prevent us from opening /box files from the caller. |
I just added a --stderr-to-stdout switch, which asks for the old default behavior. I was thinking about adding a generic file redirection mechanism, but I failed to find any nice syntax for that. Nor did I find any other applications. |
This is great, I'll try that as soon as possible! This mirrors the API we have in https://github.com/prologin/camisole/blob/master/camisole/isolate.py#L171 . The use case is when we have a single display and we want to preserve the timing of the logging, so we can't just concatenate the outputs. I also can't think of an use case for redirecting other files/fds so I think the current patch is exactly what was needed. Thanks a lot! |
The workaround for piping stderr to stdout suggested here: f7b60f2
doesn't seem to work:
Any idea why that is the case?
The text was updated successfully, but these errors were encountered: