Thread overview
[Issue 11634] std.process executeShell() Exception message is incomplete
Jun 06, 2014
Justin Whear
Jul 21, 2015
Rob T
Dec 17, 2022
Iain Buclaw
June 06, 2014
https://issues.dlang.org/show_bug.cgi?id=11634

Justin Whear <justin@economicmodeling.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |justin@economicmodeling.com

--- Comment #5 from Justin Whear <justin@economicmodeling.com> ---
Rob T: can you give an update on this?

--
July 21, 2015
https://issues.dlang.org/show_bug.cgi?id=11634

--- Comment #6 from Rob T <alanb@ucora.com> ---
I have finally re-encountered this same issue with entirely different code.

Very frustrating.

After hours of digging, including reviewing the std.process source code, it turns out that I had a signal handler set up with this line of code

signal(SIGCHLD, SIG_IGN);

Apparently the above SIGCHLD setting will cause wait(), waitid(), and waitpid()
to fail and set errno to ECHILD. However, this was not always the case, for
months the same code worked flawlessly until one day it stopped working after
making some code changes that had nothing to do with the signal handler and did
not alter the executeShell() function call.

What all this means, is that the std.process.d source code is probably fine, however there's no explanation as to why the code will work in almost all cases, then stop working later on. Whatever is going on, probably is unrelated to the std.process code, but I cannot say for certain.

One thing that can be improved, is the exception message string could include hints as to which process call had failed.

More info:

The platform/OS is now Debian Wheezy (64 bit) with all latest patches applied. DMD64 D Compiler v2.067.1

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=11634

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--