2005-02-28 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / UnixProcess.cs
index e3f5292206144ab3904be06e6daaf3e9d5ee77f1..d8b4318e501baebc358f7744e297951795138dec 100644 (file)
@@ -145,10 +145,9 @@ namespace Mono.Unix {
                {
                        int status;
                        int r;
-                       Error e;
                        do {
                                r = Syscall.waitpid (pid, out status, (WaitOptions) 0);
-                       } while (r == -1 && (e = Syscall.GetLastError()) == Error.EINTR);
+                       } while (UnixMarshal.ShouldRetrySyscall (r));
                        UnixMarshal.ThrowExceptionForLastErrorIf (r);
                }
        }