dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATH] forgoten set $PPID readonly
@ 2021-02-03 12:54 Vladimir N. Oleynik
  2024-04-05  8:41 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir N. Oleynik @ 2021-02-03 12:54 UTC (permalink / raw)
  To: dash

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

Hello.

You probably forgot to specify the readonly flag for $PPID.
Micro patch attached.


--w
vodz

[-- Attachment #2: var_ppid.diff --]
[-- Type: text/x-patch, Size: 321 bytes --]

--- 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATH] forgoten set $PPID readonly
  2021-02-03 12:54 [PATH] forgoten set $PPID readonly Vladimir N. Oleynik
@ 2024-04-05  8:41 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2024-04-05  8:41 UTC (permalink / raw)
  To: Vladimir N. Oleynik; +Cc: dash

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,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-05  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 12:54 [PATH] forgoten set $PPID readonly Vladimir N. Oleynik
2024-04-05  8:41 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).