-
-
Notifications
You must be signed in to change notification settings - Fork 745
Closed
Description
If the program receives a signal (e.g. SIGALARM) just as std.process is creating a new process, the operation may fail with:
std.process.ProcessException@std/process.d(1162): Could not read from pipe to get child status (Interrupted system call)
----------------
??:? @trusted std.process.Pid std.process.spawnProcessPosix(scope const(char[])[], std.stdio.File, std.stdio.File, std.stdio.File, scope const(immutable(char)[][immutable(char)[]]), std.process.Config, const(char)[]) [0x9266bc]
??:? @safe std.process.Pid std.process.spawnProcess(scope const(char[])[], std.stdio.File, std.stdio.File, std.stdio.File, const(immutable(char)[][immutable(char)[]]), std.process.Configconst , char[]) [0x925d01]
??:? @trusted std.process.Pid std.process.spawnProcess(scope const(char[])[], const(immutable(char)[][immutable(char)[]]), std.process.Config, const(char)[]) [0x925ee6]
...
However, the correct thing to do when a system call is interrupted by EINTR is to retry it (a very annoying part of POSIX but I think in general it has to be done with all interruptible system calls).
Metadata
Metadata
Assignees
Labels
No labels