diff options
author | jilles <jilles@FreeBSD.org> | 2013-12-25 16:14:02 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-12-25 16:14:02 +0000 |
commit | c039e1a7e4e0448b767322e4ee8f98ffe3deb6ae (patch) | |
tree | abe4c6277455c12f447b34aa2d8e6930ceedf0f8 /bin | |
parent | e2a7b55743d6c94d7b3f38e04c804de2c3af6ed5 (diff) | |
download | FreeBSD-src-c039e1a7e4e0448b767322e4ee8f98ffe3deb6ae.zip FreeBSD-src-c039e1a7e4e0448b767322e4ee8f98ffe3deb6ae.tar.gz |
sh: Simplify code related to PPID variable.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/var.c | 9 | ||||
-rw-r--r-- | bin/sh/var.h | 1 |
2 files changed, 2 insertions, 8 deletions
diff --git a/bin/sh/var.c b/bin/sh/var.c index 9c75308..1fd8c77 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -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); diff --git a/bin/sh/var.h b/bin/sh/var.h index 6cdfbfe..6ce5b24 100644 --- a/bin/sh/var.h +++ b/bin/sh/var.h @@ -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; |