svn commit: r259874 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Wed Dec 25 16:14:03 UTC 2013
Author: jilles
Date: Wed Dec 25 16:14:02 2013
New Revision: 259874
URL: http://svnweb.freebsd.org/changeset/base/259874
Log:
sh: Simplify code related to PPID variable.
Modified:
head/bin/sh/var.c
head/bin/sh/var.h
Modified: head/bin/sh/var.c
==============================================================================
--- head/bin/sh/var.c Wed Dec 25 16:01:48 2013 (r259873)
+++ head/bin/sh/var.c Wed Dec 25 16:14:02 2013 (r259874)
@@ -88,7 +88,6 @@ struct var vifs;
struct var vmail;
struct var vmpath;
struct var vpath;
-struct var vppid;
struct var vps1;
struct var vps2;
struct var vps4;
@@ -110,8 +109,6 @@ static const struct varinit varinit[] =
NULL },
{ &vpath, 0, "PATH=" _PATH_DEFPATH,
changepath },
- { &vppid, VUNSET, "PPID=",
- NULL },
/*
* vps1 depends on uid
*/
@@ -179,10 +176,8 @@ initvar(void)
vps1.text = __DECONST(char *, geteuid() ? "PS1=$ " : "PS1=# ");
vps1.flags = VSTRFIXED|VTEXTFIXED;
}
- if ((vppid.flags & VEXPORT) == 0) {
- fmtstr(ppid, sizeof(ppid), "%d", (int)getppid());
- setvarsafe("PPID", ppid, 0);
- }
+ fmtstr(ppid, sizeof(ppid), "%d", (int)getppid());
+ setvarsafe("PPID", ppid, 0);
for (envp = environ ; *envp ; envp++) {
if (strchr(*envp, '=')) {
setvareq(*envp, VEXPORT|VTEXTFIXED);
Modified: head/bin/sh/var.h
==============================================================================
--- head/bin/sh/var.h Wed Dec 25 16:01:48 2013 (r259873)
+++ head/bin/sh/var.h Wed Dec 25 16:14:02 2013 (r259874)
@@ -75,7 +75,6 @@ extern struct var vifs;
extern struct var vmail;
extern struct var vmpath;
extern struct var vpath;
-extern struct var vppid;
extern struct var vps1;
extern struct var vps2;
extern struct var vps4;
More information about the svn-src-head
mailing list