Hmm that might be true. As Elian and BrowserUK pointed out, it seems like what I proposed was a bad idea. Ok, this is my problem.
My perl program wants to access some data from an external program, B. In order to do so, I need to first run another external program, A, which is required for me to interact with B. A never dies. It continuously runs forever. So it seems like I cannot call:
system(A);
system(B);
otherwise it'll hang on system(A). And it seems like creating 2 separate threads for both A and B and having a successful completion of B kill off A is also not good.
Can someone suggest a third alternative to this problem?
Thanks!
coldfate
Comment on Re^2: Threads: How to kill a thread manually?
If your program doesn't need to interact with program A, then you can detach it, retaining the pid. When your finished with program B, use kill to terminate program A.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.