rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 8a03ed3fc54e728f7ccd2fef40b7215e1d072054
parent a819960f747a251f4b9d88e3e56f9144318efd71
Author: tim <tim>
Date:   Tue,  1 Jul 1997 19:57:16 +0000

autoconf
get consts right in casts

Diffstat:
Mexec.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/exec.c b/exec.c @@ -12,7 +12,8 @@ extern void exec(List *s, bool parent) { char **av, **ev = NULL; - int pid, stat; + int stat; + pid_t pid; builtin_t *b; char *path = NULL; bool didfork, returning, saw_exec, saw_builtin; @@ -91,16 +92,17 @@ extern void exec(List *s, bool parent) { return; rc_exit(getstatus()); } -#ifdef NOEXECVE - my_execve(path, (const char **) av, (const char **) ev); /* bogus, huh? */ +#if HASH_BANG + execve(path, (char * const *) av, (char * const *) ev); #else - execve(path, (const char **) av, (const char **) ev); + my_execve(path, (char * const *) av, (char * const *) ev); /* bogus, huh? */ #endif + #ifdef DEFAULTINTERP if (errno == ENOEXEC) { *av = path; *--av = DEFAULTINTERP; - execve(*av, (const char **) av, (const char **) ev); + execve(*av, (char * const *) av, (char * const *) ev); } #endif uerror(*av);