From 71623478718c4001a1335eb20694f98256a2ad15 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Thu, 18 Sep 2014 17:01:45 +0000 Subject: [PATCH] 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 --- usr.sbin/lpr/lpd/printjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 9771498acb3d..06ea1b03b236 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -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