OK, I think this is the last question (about processes again)

OK, I think this is the last question (about processes again)

Post by Eric Wyle » Fri, 01 Oct 1999 04:00:00



I have a parent process that is currently forking off 1
child process at a time. I have a signal handler set up to
know when that child process exits. This is working fine.

I will soon be changing the program so that several child
processes are running at once. If I do this, how will I
know which child process has exited when the signal handler
is invoked. I need to handle the exit of each child
seperately, so this is very important.

Thanks,
Eric

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

 
 
 

OK, I think this is the last question (about processes again)

Post by Erik de Castro Lop » Sat, 02 Oct 1999 04:00:00



> I have a parent process that is currently forking off 1
> child process at a time. I have a signal handler set up to
> know when that child process exits. This is working fine.

> I will soon be changing the program so that several child
> processes are running at once. If I do this, how will I
> know which child process has exited when the signal handler
> is invoked. I need to handle the exit of each child
> seperately, so this is very important.

Something like:

    pid_t  childpid ;
    int    status ;

    while ((childpid = waitpid (0, &status, WNOHANG)) > 0)
    {
       /* Know the child pid, so handle each one */
    }

can be embedded inside the signal handler.

Erik
--
+-------------------------------------------------+

+-------------------------------------------------+
"Two hands working can do more than a thousand clasped in prayer."
-- anonymous

 
 
 

1. Thinking of a 3com product? Think Again!

I would like to tell you guys how 3com has left me and thousands others
standing in the dark, by not supporting their products. Windows 2000 has
been a tough transition for everybody but surely anybody who has used
Windows 2000 knows it's everything a Windows product should be! Microsoft
has finally brought a useable product to market! Showing that the extended
period of BETA TESTING worked!

Despite all the time MS was beta testing 3com didn't come up with a driver
for their 3com 3CSOHO100-TX card. This card sold in high numbers, and is
still on sale from places like Compusa and CDW! This card shipped with
working drivers for Win 95/98 and NT but so far 3com has chosen not to
release drivers for this expensive $70 nic!

So if your getting ready to buy some 3com product I suggest you consider
another brand as 3com no longer provides you with the support options that I
expect from a well known company with such strong brand name! Not to mention
these are some of the most expensive Nic's on the market! If you got time
please visit my website and read my plea for 3com to provide drivers for me
and the other 400 people who have signed my petition!

Kevin Leidecker
www.leidecker.com/3comboycott.htm

2. how to shut down monitor w/out cutting back CPU speed

3. Think your bible is so great? Think again..

4. Linux on Compaq Prosignia VS, how?

5. ok, simple internet question - I think

6. Newsgroup Client Setup

7. ok, last question for today -- pci bridge?

8. pthread_key_delete causes segfault

9. To Eric P.McCoy::Question on process control again.

10. "nu bee:-)" ok ok ok

11. Ok..ok..just this one dumb PPP question..

12. Printcap OK, Postscript OK, together NOT OK - HELP!

13. :~( i think am gonna cry 5GB mp3es gone