an execl muss NULL anstelle von 0 uebergeben werden (auch wenn NULL

nur ein typumgewandeltes 0 ist) - ansonsten liefert mir popen keinen
filepointer zurueck.
This commit is contained in:
Oliver Lehmann 2009-07-29 06:58:38 +00:00
parent 56908bd33a
commit 5900871abf
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ char *cmd, *mode;
(void) close(stdio); (void) close(stdio);
(void) fcntl(yourside, 0, stdio); (void) fcntl(yourside, 0, stdio);
(void) close(yourside); (void) close(yourside);
(void) execl("/bin/sh", "sh", "-c", cmd, 0); (void) execl("/bin/sh", "sh", "-c", cmd, NULL);
_exit(1); _exit(1);
} }
if(pid == -1) if(pid == -1)