Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 2014 17:01:46 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271789 - head/usr.sbin/lpr/lpd
Message-ID:  <201409181701.s8IH1kfv045383@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409181701.s8IH1kfv045383>