Skip to content

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

@Vindaar

Description

@Vindaar

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? :().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions