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:
parent
56908bd33a
commit
5900871abf
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue