Browse Source

zzuf tests: make compatible with *BSD by replacing obsoleted setpgrp() with setpgid().

Evgeny Grin (Karlson2k) 8 years ago
parent
commit
0bf9a2285e
2 changed files with 4 additions and 1 deletions
  1. 3 0
      ChangeLog
  2. 1 1
      src/testzzuf/socat.c

+ 3 - 0
ChangeLog

@@ -1,3 +1,6 @@
+Thu Apr 06 23:02:07 MSK 2017
+	Make zzuf tests compatible with *BSD platforms. -EG
+
 Thu Apr 06 22:14:22 MSK 2017
 Thu Apr 06 22:14:22 MSK 2017
 	Added warning for hypothetical extra large timeout.
 	Added warning for hypothetical extra large timeout.
 	Fixed incorrect timeout calculation under extra rare conditions.
 	Fixed incorrect timeout calculation under extra rare conditions.

+ 1 - 1
src/testzzuf/socat.c

@@ -88,7 +88,7 @@ zzuf_socat_start ()
         }
         }
       return;
       return;
     }
     }
-  setpgrp ();
+  setpgid (0, 0);
   execvp ("zzuf", args);
   execvp ("zzuf", args);
   fprintf (stderr, "execution of `zzuf' failed: %s\n", strerror (errno));
   fprintf (stderr, "execution of `zzuf' failed: %s\n", strerror (errno));
   zzuf_pid = 0;                 /* fork failed */
   zzuf_pid = 0;                 /* fork failed */