On Thu, Nov 29, 2007 at 05:39:33PM +0100, Paolo Bonzini wrote: > >The more easy specification will be > > > >int execel(const char *path, const char *arg0, char *const envp[], > > ... /*, (char *)0*/); > > > >with same functionality but reordered the parameters of the function > >following the general pattern of putting '...' in the last position. > > Don't blame gcc developers (whose mailing list this is, unless something > changed recently and I wasn't warned); take the discussion in the > appropriate places and they'll care to explain you the reasons (maybe). > > Paolo
These system calls are part of the Opengroup standard for UNIX (which Linux adheres to), and they have been around for many years. At this point, I don't recall if they were part of the UNIX V7 that is the ancestor of all modern Linux, UNIX, BSD, etc. systems or whether they first appeared in System III or BSD 4.2 (early 1980's). You would need a time machine to change the functionality. http://opengroup.org/onlinepubs/009695399/functions/exec.html Basically the execl function takes the arguments to the program as separate arguments, ending in a NULL pointer to mark the end of the arguments. When the environment support was added to UNIX, the execle call just took the arguments that execl took, and added the environment pointer argument after the arguments. I tend to think the execl* functions are a hack, and think execv* is better (where you pass the arguments & environment as a vector of char *), but that is how the function is defined. -- Michael Meissner, AMD 90 Central Street, MS 83-29, Boxborough, MA, 01719, USA [EMAIL PROTECTED]