Jim Meyering <[EMAIL PROTECTED]> writes: > Eric Blake <[EMAIL PROTECTED]> wrote: > >> According to Jim Meyering on 1/28/2008 6:28 AM: >> | >> | Thanks for the suggestion, but that introduces a new way for >> | dd to fail: strdup returning NULL would often lead to a segfault. >> | Even if it were to use xstrdup, to avoid that, I don't think it's >> | justifiable solely in order to preserve ps' view of the dd command line. >> >> However, it IS justifiable by the fact that POSIX requires applications to >> treat argv[] as constant (ie. modifying argv in-place is not >> standards-compliant). True, most systems let you get away with >> modifications (in particular, think about getopt_long's behavior), but it >> would matter if we ever port coreutils to a system that follows the POSIX >> permission to insist on no modifications to the original argv and contents. >> >> 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." > > Good point. Thanks.
Except that the point has nothing to do with how the arguments are passed to the executed process. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] 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." _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils