svn commit: r271789 - head/usr.sbin/lpr/lpd

Pedro F. Giffuni pfg at FreeBSD.org
Thu Sep 18 17:01:46 UTC 2014


Author: pfg
Date: Thu Sep 18 17:01:45 2014
New Revision: 271789
URL: http://svnweb.freebsd.org/changeset/base/271789

Log:
  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

Modified:
  head/usr.sbin/lpr/lpd/printjob.c

Modified: head/usr.sbin/lpr/lpd/printjob.c
==============================================================================
--- head/usr.sbin/lpr/lpd/printjob.c	Thu Sep 18 16:55:41 2014	(r271788)
+++ head/usr.sbin/lpr/lpd/printjob.c	Thu Sep 18 17:01:45 2014	(r271789)
@@ -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


More information about the svn-src-head mailing list