[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use strdup in dd to avoid changing argv elements
From: |
Andreas Schwab |
Subject: |
Re: [PATCH] Use strdup in dd to avoid changing argv elements |
Date: |
Mon, 28 Jan 2008 15:21:17 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> http://www.opengroup.org/onlinepubs/009695399/functions/execl.html
> "The statement about argv[] and envp[] being constants is included to make
> explicit to future writers of language bindings that these objects are
> completely constant. Due to a limitation of the ISO C standard, it is not
> possible to state that idea in standard C."
I think you are mixing up something here. This statement is only
related to the fact that a call to exec* must not modify any of the argv
and envp strings, despite the difficulty of expressing that in the
prototype. The C standard explicitly requires that the argv array
contents are modifiable in the executed process.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- [PATCH] Use strdup in dd to avoid changing argv elements, Adam Goode, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Eric Blake, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Andreas Schwab, 2008/01/28
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Paul Eggert, 2008/01/29
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/30
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Paul Eggert, 2008/01/30
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Jim Meyering, 2008/01/31
- Re: [PATCH] Use strdup in dd to avoid changing argv elements,
Andreas Schwab <=
- Re: [PATCH] Use strdup in dd to avoid changing argv elements, Eric Blake, 2008/01/28