From: Francis Cianfrocca Date: 2006-08-08T03:02:39+09:00 Subject: Re: How to recognize which child process has just ended? Lukasz Muziol wrote: > Hi! > > The piece of software I'm working on now needs to fork child processes > and execute different programs (which terminate themselves). Also, some > child processes need to be killed/stopped/resumed and action needs to be > taken when a child is terminated. When the parent receives & traps the > SIGCLD signal, how does it know which child it is regarding and whether > it has been ended, terminated, stopped or resumed? > > In brief, I need the information, which in C signal handling is > accessible via the siginfo_t structure. > > Thanks. Look at Process#wait2 and Process#waitpid2. -- Posted via http://www.ruby-forum.com/.