Skip to content

Commit

Permalink
Replace setpgrp(...) with POSIX setpgid()
Browse files Browse the repository at this point in the history
The latter has an API independent of the Unix version, so we avoid
compilation errors f.e. on newer macosx versions.
  • Loading branch information
olebole committed May 25, 2017
1 parent fdbd592 commit 6398b31
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions unix/os/zmain.c
Expand Up @@ -133,12 +133,7 @@ main (int argc, char *argv[])
* root menu].
*/
jobcode = getpid();
#if defined(SYSV) || (defined(MACH64) && defined(MACOSX) || defined(IPAD))
setpgrp ();
#else
setpgrp (0, jobcode);
#endif

setpgid (0, jobcode);
freopen ("/dev/null", "r", stdin);
prtype = PR_DETACHED;
ZLOCPR (ZGETTX, &driver);
Expand Down

0 comments on commit 6398b31

Please sign in to comment.