Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2010 10:46:25 +0000 (UTC)
From:      Bruce Cran <brucec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r204033 - in stable/8: bin/pkill bin/ps usr.bin/w
Message-ID:  <201002181046.o1IAkP2k040648@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brucec
Date: Thu Feb 18 10:46:25 2010
New Revision: 204033
URL: http://svn.freebsd.org/changeset/base/204033

Log:
  MFC r203688:
  
  Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
  the -M option to be used without specifying -N.
  
  PR:	bin/138146
  Approved by:	rrs (mentor)

Modified:
  stable/8/bin/pkill/pkill.c
  stable/8/bin/ps/ps.c
  stable/8/usr.bin/w/w.c
Directory Properties:
  stable/8/bin/pkill/   (props changed)
  stable/8/bin/ps/   (props changed)
  stable/8/usr.bin/w/   (props changed)

Modified: stable/8/bin/pkill/pkill.c
==============================================================================
--- stable/8/bin/pkill/pkill.c	Thu Feb 18 10:39:53 2010	(r204032)
+++ stable/8/bin/pkill/pkill.c	Thu Feb 18 10:46:25 2010	(r204033)
@@ -180,7 +180,8 @@ main(int argc, char **argv)
 	debug_opt = 0;
 	pidfile = NULL;
 	pidfilelock = 0;
-	execf = coref = _PATH_DEVNULL;
+	execf = NULL;
+	coref = _PATH_DEVNULL;
 
 	while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1)
 		switch (ch) {

Modified: stable/8/bin/ps/ps.c
==============================================================================
--- stable/8/bin/ps/ps.c	Thu Feb 18 10:39:53 2010	(r204032)
+++ stable/8/bin/ps/ps.c	Thu Feb 18 10:46:25 2010	(r204033)
@@ -212,7 +212,8 @@ main(int argc, char *argv[])
 	init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id");
 	init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty");
 	init_list(&uidlist, addelem_uid, sizeof(uid_t), "user");
-	memf = nlistf = _PATH_DEVNULL;
+	memf = _PATH_DEVNULL;
+	nlistf = NULL;
 	while ((ch = getopt(argc, argv, PS_ARGS)) != -1)
 		switch (ch) {
 		case 'A':

Modified: stable/8/usr.bin/w/w.c
==============================================================================
--- stable/8/usr.bin/w/w.c	Thu Feb 18 10:39:53 2010	(r204032)
+++ stable/8/usr.bin/w/w.c	Thu Feb 18 10:46:25 2010	(r204033)
@@ -158,7 +158,8 @@ main(int argc, char *argv[])
 	}
 
 	dropgid = 0;
-	memf = nlistf = _PATH_DEVNULL;
+	memf = _PATH_DEVNULL;
+	nlistf = NULL;
 	while ((ch = getopt(argc, argv, p)) != -1)
 		switch (ch) {
 		case 'd':



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