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

In case of too much output OutputExecutor hangs #98

Open
pwilczynskiclearcode opened this issue Apr 21, 2016 · 4 comments
Open

In case of too much output OutputExecutor hangs #98

pwilczynskiclearcode opened this issue Apr 21, 2016 · 4 comments

Comments

@pwilczynskiclearcode
Copy link
Contributor

I happens when subprocess produces large amounts of output.

https://thraxil.org/users/anders/posts/2008/03/13/Subprocess-Hanging-PIPE-is-your-enemy/

Mirakuru could use real files instead of PIPE or make it an option.

@mmaslowskicc
Copy link
Contributor

Seems related to #74.

I think keeping stdout as parent process's stdout would be best (e.g. for logging output from processes in CI tests), but it would be an incompatible API change breaking SimpleExecutor.output.

@pwilczynskiclearcode
Copy link
Contributor Author

So maybe we should make it an option:

  • hide subprocess output by redirecting it into a file (instead of currently used PIPEs) (default)

    .output() would be a file descriptor

  • use parent stdout and strerr for subprocess stdout and err

    I'm not sure what should .output() return it that case.

@mmaslowskicc
Copy link
Contributor

Raise an exception from .output() if not redirecting to a pipe?

@mmaslowskicc
Copy link
Contributor

Can we make the whole output redirection non-default? It's useful only when explicitly accessing the captured output, while I need usual logging of the stdout (to my process's stdout, or captured by pytest) if any process invocation fails (e.g. when running a Java process that logs useful info on stdout).

It could be easily split into a mixin.

Currently I need to comment out stdout redirection when getting any error from test fixtures using Mirakuru.

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

No branches or pull requests

3 participants