Thread denkfehler? waitpid killt meinen Elternprozess... (1 answers)
Opened by Wlet at 2006-06-21 11:28

Wlet
 2006-06-21 12:22
#67468 #67468
User since
2006-05-24
15 Artikel
BenutzerIn
[default_avatar]
So,

mittlerweile habe ich eine Lösung für mein Problem gefunden:

Ich setze den Signahandler auf IGNORE, dann kümmert sich das Unix um das aufräumen.

Code: (dl )
$SIG{CHLD} = 'IGNORE';


perlipc

Quote
On most Unix platforms, the "CHLD" (sometimes also known as "CLD") signal has special behavior with
respect to a value of 'IGNORE'. Setting $SIG{CHLD} to 'IGNORE' on such a platform has the effect of
not creating zombie processes when the parent process fails to "wait()" on its child processes (i.e.
child processes are automatically reaped). Calling "wait()" with $SIG{CHLD} set to 'IGNORE' usually
returns "-1" on such platforms.


Kaum macht mans richtig, geht's ;)

Wlet

View full thread denkfehler? waitpid killt meinen Elternprozess...