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
I believe it's the default and expected behaviour to use the parent-process file handles in subprocesses. Thus stdin and stdout will be cloned from the terminal in some cases.
However, the way the parameter is documented indicates the intention was different: If True, default True, we open stdout on the created process, and I guess otherwise you don't show anything.
Unfortunately DEVNULL is only available in python >=3.3, and the alternative, popen(stdout=open(os.devnull, 'wb'), ...) leaves me puzzled about who is going to close the opened file-handle.
Do you have any information on this ? Opening a stderr permanently and reusing the file-handle would be easy enough, but at least I'd like to know what this means for resource handling.
Great, it looks like Popen takes care of the details automatically for you, and closes the freshly opened file-handle (or transfers it to the subprocess, who knows).
The command print "Already up-to-date" to the console.
It seems that problem is the use of with_stdout=False that then does not both to do anything to stdout.
git-python-with-stdout.txt
The attached patch seems to fix the problem by setting stdout to DEVNULL. Tested on python 3.4.
The text was updated successfully, but these errors were encountered: