svn commit: r273513 - stable/10/usr.sbin/lpr/lpd

Pedro F. Giffuni pfg at FreeBSD.org
Thu Oct 23 02:53:58 UTC 2014


Author: pfg
Date: Thu Oct 23 02:53:57 2014
New Revision: 273513
URL: https://svnweb.freebsd.org/changeset/base/273513

Log:
  MFC	r271789:
  
  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.

Modified:
  stable/10/usr.sbin/lpr/lpd/printjob.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/lpr/lpd/printjob.c
==============================================================================
--- stable/10/usr.sbin/lpr/lpd/printjob.c	Thu Oct 23 02:50:18 2014	(r273512)
+++ stable/10/usr.sbin/lpr/lpd/printjob.c	Thu Oct 23 02:53:57 2014	(r273513)
@@ -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-stable mailing list