You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that only Popen::poll() sets Popen::retcode_ (which can be retrieved using Popen::retcode()), but Popen::communicate() instead calls Popen::wait() and throws away the result. I tried calling Popen::poll() myself, but it seems that just returns 0 (IIRC waitpid will only work once).
A simple fix seems to be to let communicate() do retcode_ = wait();, which works, but I'm not sure if that's the best approach here (perhaps wait() should just set it?).
The text was updated successfully, but these errors were encountered:
Hello @matthijskooijman
Thanks for reporting the issue.
I think its best that wait returns the retcode instead of setting itself. Thats what I have done in the commit as well.
Thanks. It seems that setting the return code in wait() would be more like the python version, though: https://stackoverflow.com/a/5631819/740048 (but if you manually call wait, you can of course just save the retcode yourself, so it's not a very big deal).
It seems that only
Popen::poll()
setsPopen::retcode_
(which can be retrieved usingPopen::retcode()
), butPopen::communicate()
instead callsPopen::wait()
and throws away the result. I tried callingPopen::poll()
myself, but it seems that just returns 0 (IIRCwaitpid
will only work once).A simple fix seems to be to let
communicate()
doretcode_ = wait();
, which works, but I'm not sure if that's the best approach here (perhapswait()
should just set it?).The text was updated successfully, but these errors were encountered: