*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/waitid (2)              
Title
Content
Arch
Section
 

Contents


waitid(2)							     waitid(2)


NAME    [Toc]    [Back]

     waitid - wait for child process to	change state

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <wait.h>

     int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int	options);

DESCRIPTION    [Toc]    [Back]

     waitid suspends the calling process until one of its children changes
     state.  It	records	the current state of a child in	the structure pointed
     to	by infop.  If a	child process changed state prior to the call to
     waitid, waitid returns immediately.

     The idtype	and id arguments specify which children	waitid is to wait for.

	  If idtype is P_PID, waitid waits for the child with a	process	ID
	  equal	to (pid_t) id.

	  If idtype is P_PGID, waitid waits for	any child with a process group
	  ID equal to (pid_t)id.

	  If idtype is P_ALL, waitid waits for any children and	id is ignored.

     The options argument is used to specify which state changes waitid	is to
     wait for.	It is formed by	an OR of any of	the following flags:

     WEXITED	    Wait for process(es) to exit.

     WTRAPPED	    Wait for traced process(es)	to become trapped or reach a
		    breakpoint (see ptrace(2)).

     WSTOPPED	    Wait for and return	the process status of any child	that
		    has	stopped	upon receipt of	a signal.

     WCONTINUED	    Return the status for any child that was stopped and has
		    been continued.

     WNOHANG	    Return immediately.

     WNOWAIT	    Keep the process in	a waitable state.

     infop must	point to a siginfo_t structure,	as defined in siginfo(5).
     siginfo_t is filled in by the system with the status of the process being
     waited for.

     waitid fails if one or more of the	following is true.

     EFAULT	    infop points to an invalid address.





									Page 1






waitid(2)							     waitid(2)



     EINTR	    waitid was interrupted due to the receipt of a signal by
		    the	calling	process.

     EINVAL	    An invalid value was specified for options.

     EINVAL	    idtype and id specify an invalid set of processes.

     ECHILD	    The	set of processes specified by idtype and id does not
		    contain any	unwaited-for processes.

DIAGNOSTICS    [Toc]    [Back]

     If	waitid returns due to a	change of state	of one of its children,	a
     value of 0	is returned.  If WNOHANG was specified,	0 may also be returned
     indicating	no error.  Otherwise, a	value of -1 is returned	and errno is
     set to indicate the error.

SEE ALSO    [Toc]    [Back]

      
      
     exec(2), exit(2), fork(2),	intro(2), pause(2), ptrace(2), sigaction(2),
     signal(2),	wait(2), siginfo(5)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
wait HP-UX wait for child process to stop or terminate
waitpid Tru64 Wait for a child process to stop or terminate
wait Tru64 Wait for a child process to stop or terminate
wait4 Tru64 Wait for a child process to stop or terminate
wait3 Tru64 Wait for a child process to stop or terminate
waitpid HP-UX wait for child process to stop or terminate
wait IRIX wait for child processes to stop or terminate
wait IRIX wait for child processes to stop or terminate
pthread_atfork Tru64 Declares fork handler routines to be called when the calling thread's process forks a child process
pxfwait IRIX Obtains information about a calling process' child process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service