Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2018 14:00:45 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332367 - stable/11/etc
Message-ID:  <201804101400.w3AE0jKe073298@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Apr 10 14:00:45 2018
New Revision: 332367
URL: https://svnweb.freebsd.org/changeset/base/332367

Log:
  MFC r308896
  
  r308896: rc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it.
  
  The JID keyword writes 0 for a process also in the host system or in the
  same jail.

Modified:
  stable/11/etc/rc.subr
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.subr
==============================================================================
--- stable/11/etc/rc.subr	Tue Apr 10 13:56:30 2018	(r332366)
+++ stable/11/etc/rc.subr	Tue Apr 10 14:00:45 2018	(r332367)
@@ -49,7 +49,7 @@ PROTECT="/usr/bin/protect"
 ID="/usr/bin/id"
 IDCMD="if [ -x $ID ]; then $ID -un; fi"
 PS="/bin/ps -ww"
-JID=`$PS -p $$ -o jid=`
+JID=0
 
 #
 #	functions



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