[Bug libc/13712] Add Type Cast to Main and Exec Calls
jsm28 at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Mon Feb 20 23:50:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=13712
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-02-20 23:49:59 UTC ---
For better or for worse, this is simply how C and the Unix syscall interface
work: programs receive an array of NUL-terminated strings in C, and such an
array is what is passed to the execve syscall. The third argument of main on
Unix-like systems is already an array of environment variables and it is not
possible to change that incompatibly. If you wanted a more structured
interface as an alternative then it can't be proposed through a bug for one
component as this major change to C and Unix would need development in multiple
components together; you'd need to prepare implementations for all the
components involved, papers for WG14 (C) and the Austin Group (POSIX)
explaining the design and get agreement from multiple stakeholders.
The standard technique for shell scripts to deal with this issue is either
using "./*" or using the "--" argument to separate options from arguments.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list