It appears that gdc version of libphobos is somehow lagging in some aspects behind upstream. One of the things I see missing, is `Config.stderrPassThrough` in std.process. I see it was added upstream about 12 months ago: enum Config { ... /** By default, the $(LREF execute) and $(LREF executeShell) functions will capture child processes' both stdout and stderr. This can be undesirable if the standard output is to be processed or otherwise used by the invoking program, as `execute`'s result would then contain a mix of output and warning/error messages. Specify this flag when calling `execute` or `executeShell` to cause invoked processes' stderr stream to be sent to $(REF stderr, std,stdio), and only capture and return standard output. This flag has no effect on $(LREF spawnProcess) or $(LREF spawnShell). */ stderrPassThrough = 128, } The implementation usage of this is relatively small and easy to backport: in executeImpl: - auto p = pipeFunc(commandLine, Redirect.stdout | Redirect.stderrToStdout, - env, config, workDir, extraArgs); + auto redirect = (config & Config.stderrPassThrough) + ? Redirect.stdout + : Redirect.stdout | Redirect.stderrToStdout; + + auto p = pipeFunc(commandLine, redirect, + env, config, workDir, extraArgs); There are some other minor changes there, but nothing functionally significant. Mostly unittests and minor signature changes (adding `scope` to many input parameters). Thank you.
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:e19c6389966216af5925d2917a206cedc40540e8 commit r11-8249-ge19c6389966216af5925d2917a206cedc40540e8 Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Mon Apr 19 13:51:02 2021 +0200 libphobos: Merge upstream druntime 89f870b7, phobos e6907ff3e Phobos changes: - Synchronize C bindings with the latest port fixes in upstream druntime. - Add Config.stderrPassThrough to std.process (PR98494). Reviewed-on: https://github.com/dlang/druntime/pull/3448 https://github.com/dlang/phobos/pull/7984 libphobos/ChangeLog: PR d/98494 * libdruntime/MERGE: Merge upstream druntime 89f870b7. * src/MERGE: Merge upstream phobos e6907ff3e.
Added to phobos.