Path: utzoo!utgpu!attcan!uunet!munnari!otc!metro!basser!mqcomp!martin From: martin@mqcomp.oz (Martin Foord) Newsgroups: comp.unix.wizards Subject: exec() with executable shell scripts Keywords: exec() sh Message-ID: <647@mqcomp.oz> Date: 20 Apr 89 06:37:47 GMT Organization: Computing Discipline, Macquarie Uni, NSW, 2109, Australia Lines: 26 Everytime I seem to exec() a shell script that is executable I have problems (execepting if I use execlp() or execvp()). For example, the program (where /bin/true is an executable shell script) : % cat foo.c #include char *arg="true"; main() { char *args[2]; args[1]=arg; args[2]=NULL; execv("/bin/true",args); printf("Can't execute process\n"); } % foo Can't execute process Why is this ? Is it because /bin/true is a shell script because othere executable non-shell scripts work fine. maf.