execve() argument types



The following is the definition for execve():

int execve(const char *path, char *const argv[], char *const envp[]);

I'm curious why the partial const attribute for the argument vectors but
not for the argument characters themselves. Why not:

int execve(const char *path, const char *const argv[], const char *const envp[]);

Is execve() expected to modify the argument and/or environment strings
in the unreplaced VM if it fails and returns an error? It would be
easier to call execve() with either const or non-const strings if it
had a definition like that.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2006-10-29-2022@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: execve() argument types
    ... I'm curious why the partial const attribute for the argument vectors but ... Is execve() expected to modify the argument and/or environment strings ...
    (comp.unix.programmer)
  • Re: execve() argument types
    ... I'm curious why the partial const attribute for the argument vectors but ... Is execve() expected to modify the argument and/or environment strings ... environment strings are in shared memory, it's relevant -- will the new ...
    (comp.unix.programmer)