[Issue 11634] std.process executeShell() Exception message is incomplete

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 20 20:43:39 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=11634

--- Comment #6 from Rob T <alanb at 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

--


More information about the Digitalmars-d-bugs mailing list