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

shell sometimes blocks on outStream.readLine when cmd writes to stderr #10

Open
Vindaar opened this issue May 15, 2020 · 0 comments
Open

Comments

@Vindaar
Copy link
Owner

Vindaar commented May 15, 2020

On my system shell sometimes hangs on the outStream.readLine line if the called command also writes to stderr.
I'm not sure what changed, but lately this happens anytime I use shell to invoke a nim compilation. Was all output in the past done to stdout?

In any case, one solution is to use the poStdErrToStdOut flag, but that's nasty because then we always combine stdout and stderr, which is not desirable in many cases.

Another solution is to make use of async to read from stderr and stdout concurrently (I believe that should work, but me and async don't have a very good relationship...).

The third solution is to use threads + channels to do the same. Avoids me having to figure out how to use async properly, but would require to compile with --threads:on always (why is that still not the default? :().

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

1 participant