blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
Index | Description | Usage | Options | Variables | Hints | Bulletproof

wait

Arguments Significance
-i declares the process to wait corresponding to the named spawn_id (NOT the process id).  Inside a SIGCHLD handler, it is possible to wait for any spawned process by using the spawn id -1.
-nowait causes the wait to return immediately with the indication of a successful wait.  When the process exits (later), it will automatically disappear without the need for an explicit wait.

Delays until a spawned process (or the current process if none is named) terminates.  Returns a list of:

{ PID  spawn_id  ?OS_error?  spawn_rval }
Also sets global cb

The wait command normally returns a list of four integers.  The first integer is the pid of the process that was waited upon.  The second integer is the corresponding spawn id.  The third integer is -1 if an operating system error occurred, or 0 otherwise.  If the third integer was 0, the fourth integer is the status returned by the spawned process.  If the third integer was -1, the fourth integer is the value of errno set by the operating system.

Additional elements may appear at the end of the return value from wait.  An optional fifth element identifies a class of information.  Currently, the only possible value for this element is CHILDKILLED in which case the next two values are the C-style signal name and a short textual description.


This material is excerpted from the O'Reilly book "Exploring Expect" by Don Libes and from the Solaris manpage.

 

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609