Am Dienstag, 30. Dezember 2003 00:36 schrieb Ferdinand Ihringer:
Hallo,
Am Dienstag, 30. Dezember 2003 00:10 schrieb Gerald Goebel:
solang der kid läuft gibt waitpid 0 zurück. ist kid aber beendet, gibt waitpid die pid des beendeten kid zurück.
In perldoc -f waitpid steht bei am Anfang das: waitpid PID,FLAGS Waits for a particular child process to terminate and returns the pid of the deceased process, or "-1" if there is no such child process. On some systems, a value of 0 indicates that there are processes still running.
Da steht "on some systems". Wäre dann nicht "unless ($kid > 0 or $kid < 0)" besser als "if ($kid == 0)" ?
Äh. Natürlich meine ich "unless ($kid > 0 and $kid < 0)". Sonst wäre die Bedingung ja immer wahr.