in reply to Re: cleanly exiting threads
in thread cleanly exiting threads

Okay, I'm running under linux so my understanding that an open2 is actually a fork, correct?

I have verified that my

$kpid = waitpid ($pid, 0);
at the end of the while loop is returning with $kpid always matching $pid -- which i believe means that the process is actually done.

Having said that, I have no idea what the binaries that I am running with the open command may be doing. they maybe not quite finishing, so, maybe doing an explicit kill would be better than just waiting...or perhaps send the sigint, (which they all handle), then leave the waitpid in place. may be more reliable

So thanks for the thoughts, i'll have to dig in again tomorrow.

Replies are listed 'Best First'.
Re^3: cleanly exiting threads
by BrowserUk (Patriarch) on Aug 14, 2008 at 02:27 UTC
    I'm running under linux

    Whoops! I completely missed that detail. Which kinda renders most of what i wrote redundant.

    In that case I can't offer much information, only an inate suspicion of mixing threads and fork. I did have some more to say about that, but reviewing it, I cannot find anything to back up my suspicions, so I'll just back out of this and wish you good luck.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.