procutil: drop unused 'newlines' option from popen*() (API)
It's unlikely for us to use the universal_newlines option.
procutil: make explainexit() simply return a message (API)
Almost all callers want it.
procutil: do not convert return code of signal exit to positive number (API)
The docstring states that "codes from kill are negative", and it doesn't
make sense to make exit/signal code ambiguous.
.. api::
``hook.hook()`` and ``hook.runhooks()`` may return a negative integer
to denote that the process was killed by signal.
procutil: fix error message of tempfile filter
First, we need to use procutil.system() to get an exit code compatible with
explainexit(). Second, explainexit() returns (msg, code) tuple.
procutil: unify platform.explainexit()
Since
4368f582c806 "use subprocess instead of os.system", posix.explainexit()
is the superset of Windows implementation.
procutil: rewrite popen() as a subprocess.Popen wrapper (
issue4746) (API)
os.popen() of Python 3 is not the popen() we want. First, it doesn't accept
command in bytes. Second, a returned stream is always wrapped by TextIO.
So we have to reimplement our popen(). Fortunately, this fixes the bug 4746
since ours returns an exit code compatible with explainexit().
.. api::
``procutil.popen()`` no longer supports text mode I/O.