Message ID | be7ceb79-c721-740a-7f5a-b65b15d4da24@simtreas.ru (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Herbert Xu |
Headers | show |
Series | [PATH] forgoten set $PPID readonly | expand |
On Wed, Feb 03, 2021 at 04:54:24PM +0400, Vladimir N. Oleynik wrote: > > You probably forgot to specify the readonly flag for $PPID. > Micro patch attached. This is not defined by POSIX. In fact there seems to be no consensus amongst other shells. Thanks,
--- var.c~ 2021-01-31 12:30:38.000000000 +0400 +++ var.c 2021-02-03 16:46:34.657412861 +0400 @@ -139,7 +139,7 @@ setvareq(defoptindvar, VTEXTFIXED); fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); - setvareq(ppid, VTEXTFIXED); + setvareq(ppid, VTEXTFIXED|VREADONLY); p = lookupvar("PWD"); if (p)