-/* $OpenBSD: proc.c,v 1.20 2014/10/25 03:18:13 lteo Exp $ */
+/* $OpenBSD: proc.c,v 1.21 2014/12/16 03:35:49 millert Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
fatal("proc_run: cannot fork");
case 0:
/* Set the process group of the current process */
- setpgrp(0, getpid());
+ setpgid(0, 0);
break;
default:
return (pid);
-/* $OpenBSD: proc.c,v 1.5 2014/10/25 03:23:49 lteo Exp $ */
+/* $OpenBSD: proc.c,v 1.6 2014/12/16 03:35:49 millert Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
fatal("proc_run: cannot fork");
case 0:
/* Set the process group of the current process */
- setpgrp(0, getpid());
+ setpgid(0, 0);
break;
default:
return (pid);
-/* $OpenBSD: printjob.c,v 1.52 2014/02/07 23:06:21 millert Exp $ */
+/* $OpenBSD: printjob.c,v 1.53 2014/12/16 03:35:49 millert Exp $ */
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
/*
}
(void)close(fd);
}
- pid = getpid(); /* for use with lprm */
- setpgrp(0, pid);
+ setpgid(0, 0);
/* we add SIGINT to the mask so abortpr() doesn't kill itself */
memset(&sa, 0, sizeof(sa));
/*
* write process id for others to know
*/
+ pid = getpid();
if ((pidoff = i = snprintf(line, sizeof(line), "%d\n", pid)) >=
sizeof(line) || pidoff == -1) {
syslog(LOG_ERR, "impossibly large pid: %u", pid);
-/* $OpenBSD: rarpd.c,v 1.56 2014/10/31 20:11:52 deraadt Exp $ */
+/* $OpenBSD: rarpd.c,v 1.57 2014/12/16 03:35:49 millert Exp $ */
/* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */
/*
(void) close(f);
}
(void) chdir("/");
- (void) setpgrp(0, getpid());
+ (void) setpgid(0, 0);
devnull = open(_PATH_DEVNULL, O_RDWR);
if (devnull >= 0) {
(void) dup2(devnull, STDIN_FILENO);
-/* $OpenBSD: proc.c,v 1.17 2014/10/25 03:23:49 lteo Exp $ */
+/* $OpenBSD: proc.c,v 1.18 2014/12/16 03:35:49 millert Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
fatal("proc_run: cannot fork");
case 0:
/* Set the process group of the current process */
- setpgrp(0, getpid());
+ setpgid(0, 0);
break;
default:
return (pid);
-/* $OpenBSD: proc.c,v 1.12 2014/10/25 03:23:49 lteo Exp $ */
+/* $OpenBSD: proc.c,v 1.13 2014/12/16 03:35:49 millert Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
fatal("proc_run: cannot fork");
case 0:
/* Set the process group of the current process */
- setpgrp(0, getpid());
+ setpgid(0, 0);
break;
default:
return (pid);