Skip to content
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

Possible to pipe stderr to a the stderr of a script using systemu? #36

Open
wwood opened this issue Dec 15, 2014 · 1 comment
Open

Possible to pipe stderr to a the stderr of a script using systemu? #36

wwood opened this issue Dec 15, 2014 · 1 comment

Comments

@wwood
Copy link

wwood commented Dec 15, 2014

Hi,

I'm writing a script which wraps wget with systemu, and I was hoping to pipe the stderr from wget (which includes a download progress bar) to stderr of the user running the script. This happens if one uses simple backticks, but I can't seem to get systemu to show the progress bar as it goes. Perhaps part of the problem is that systemu writes the entire stderr to file before it returns it to the calling script.

Any ideas?
Thanks,
ben

@damphyr
Copy link
Collaborator

damphyr commented Dec 15, 2014

I don't think that it is possible.
Roughly explained systemu spawns a new process, pipes stderr and stdout into files and then reads them back when the process ends. The way the new process is spawned won't allow you to stream any of the pipes back into the controlling process.

It's the price to pay for platform independence. If you don't need to run your scripts on ix *and Windows then you'll get what you want by using popen3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants