id() doesn't return same values across threads.). The solution would be to use Linux::Pid module from CPAN (which always return true pid/ppid values) and then it should work as supposed.
[Perl+Linux] Check in child process wether parent process still exists or not
it won't work. Perl does some caching on ppid/pid because of threading issues (for example linuxthreads and other threading implementation implements threads via clone() as different proccess - so getp
August 05, 2005 05:18 AM
Hmm oke, thanks for the info.
I no longer need help on the child proceses since I got around fixing my kill handlers so the child processen stops when the parent gets killed/stopped. I've tested my old code (which didn't work properly) but for some reason the child processes stopped when I kill the parent. It's very strange because I've tested it before and it didn't work at that time. Oh well, I'm just happy that it's fixed now.
I no longer need help on the child proceses since I got around fixing my kill handlers so the child processen stops when the parent gets killed/stopped. I've tested my old code (which didn't work properly) but for some reason the child processes stopped when I kill the parent. It's very strange because I've tested it before and it didn't work at that time. Oh well, I'm just happy that it's fixed now.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement