laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi wise monks! I use pp on windows to create an exe. When running that exe, pp seems to create a child process - which seems to be my perl program. The problem I have is that if the 'parent' (pp?) is killed off, the child (my program) just keeps on running. I tried to fix this in my program by getting the ppid, and then doing kill 0, $ppid, to detect if the parent is gone, but because of the way windows maintains the parent ppid in its process table (until all children are gone), kill 0 always returns true, even if the parent is terminated and gone. I am using websocketd to calling my pp generated exe for each client, and websocketd kills the exe when clients disconnect. But this leaves my program running as a orphan child. Does anyone have any ideas to get around this? Thanks! In reply to killing pp exe on windows leaves child running? by sectokia
|
|