checkneg
authorChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:13:24 +0000 (20:13 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:13:24 +0000 (20:13 +0000)
contrib/timeout_watchdog.c

index b28e8e833b7bf380040a5e42392757a669c4a81e..5fbe7e339b2f4459a0c90e5ca71a853f237732a7 100644 (file)
@@ -94,7 +94,8 @@ main (int argc, char *argv[])
     {
       /*  int setpgrp(pid_t pid, pid_t pgid); is not working on this machine */
       //setpgrp (0, pid_t gpid);
-      setpgid (0, gpid);
+      if (-1 !- gpid)
+       setpgid (0, gpid);
       execvp (argv[2], &argv[2]);
       exit (1);
     }