lpr: replace setpgrp(2) with setpgid(2).

setpgid(2) is more portable than setpgrp(2).
The BSD variant of setpgrp is a wrapper for
setpgid(2) anyways.

MFC after:	5 weeks
This commit is contained in:
Pedro F. Giffuni 2014-09-18 17:01:45 +00:00
parent f8c2f66a6c
commit 7162347871

View File

@ -176,7 +176,7 @@ printjob(struct printer *pp)
}
if(setgid(getegid()) != 0) err(1, "setgid() failed");
printpid = getpid(); /* for use with lprm */
setpgrp(0, printpid);
setpgid((pid_t)0, printpid);
/*
* At initial lpd startup, printjob may be called with various