[phobos] Major improvements to std.process

Lars Tandle Kyllingstad lars at kyllingen.net
Fri Mar 12 01:13:00 PST 2010


Steve Schveighoffer wrote:
> The signal termination aspect of wait is not portable to Windows.  Should we put a note that the function only occurs on POSIX systems, or is that enough to remove the feature?

Is there no way of detecting abnormal termination, such as a process 
being killed by the process manager?

If not, then we can do what is currently done in std.process, namely

    if (terminatedNormally)       return exitCode;
    else if (terminatedBySignal)  return -signal;

This works because POSIX exit codes are restricted to the range 0-255.

-Lars


More information about the phobos mailing list