In a message written on Sun, Jul 20, 2003 at 02:13:52PM -0700, Tim Kientzle wrote: > If I declare argv as "const char *", > then the call to execve() warns about > "incompatible pointer type" for the > second argument.
Almost, but the other order is important here, this passes gcc -Wall: #include <unistd.h> #include <paths.h> int main(int argc, char *const argv[], char *const envp[]) { char *const execargv[] = { _PATH_BSHELL, NULL }; execve(_PATH_BSHELL,execargv,envp); return 0; } -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org
pgp00000.pgp
Description: PGP signature