waitpid

waitpid

Post by d_g.. » Thu, 30 Nov 2000 04:00:00



hi all,
        I could not understand the option WCONTINUED in waitpid(). Can
one of you explain what it is. And one more thing, there is no such
option in LINUX. Why?. To acheive similar behaviour what is the correct
option.

giri

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

waitpid

Post by Roger A. Faulkn » Thu, 30 Nov 2000 04:00:00



>hi all,
>    I could not understand the option WCONTINUED in waitpid(). Can
>one of you explain what it is. And one more thing, there is no such
>option in LINUX. Why?. To acheive similar behaviour what is the correct
>option.

These two options are related:

     WUNTRACED (aka WSTOPPED)
           The status of any child  processes  specified  by  pid
           that  are  stopped,  and whose status has not yet been
           reported since they stopped, is also reported  to  the
           calling process.

     WCONTINUED
           The status of any continued child process specified by
           pid,  whose status has not been reported since it con-
           tinued, is also reported to the calling process.

WSTOPPED makes waitpid() return the child status when the
child process is stopped via a job-control stopping
signal like SIGSTOP.

WCONTINUED makes waitpid() return the child status when the
child process is continued via SIGCONT.

These options are used typically by job-control shells.
I don't know why LINUX does not provide WCONTINUED.

Roger Faulkner


 
 
 

1. waitpid problem

Hi!

I have a strange problem with waitpid() on IRIX 6.5: A child process
(which only contains "sleep 10;exit 4) was created by fork/exec.
The parent process waits for the child process using waitpid without WNOHANG
until it exits (so the parent is blocked until the child exits).

Everything works well except waitpid is called only a very short time
after fork: In this case waitpid returns with !WIFEXITED -- I thought this
shouldn't happen. If I call waitpid again it returns with -1 and
errno=ECHILD. Any idea what's wrong? Everything is fine if waitpid
is called a little later.

Andreas Stelter
--
Andreas Stelter  
SICAD Geomatics, Rohrdamm 85, 13629 Berlin
Phone +49-30-386-28240   Fax +49-30-386-42265
http://www.sicad.de

2. Q: physical DISCTOOL

3. Defunct Processes Despite a waitpid()

4. I get dots on my xterms when I move them.

5. RRe: Linux, waitpid and ECHILD

6. X munges display on exit

7. Problem with waitpid on DEC Alpha platform

8. 3.1.2D How to??

9. waitpid question

10. wait()/waitpid() implementation in Linux doesn't conform to POSIX?

11. wait, waitpid - help

12. waitpid() for a non parent process

13. When would waitpid with the WNOHANG option return -1