-remove dead api
[oweals/gnunet.git] / contrib / timeout_watchdog.c
index b28e8e833b7bf380040a5e42392757a669c4a81e..a33f67adc007b6eb84335988eaeeb8556865db2e 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);
     }