blank.gif (43 bytes)

Church Of The
Swimming Elephant

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


Creates a new process. 

The new process  is  an  exact copy  of the current Expect process. 

On success, fork returns 0 to the new (child) process and  returns  the process ID of the child process to the parent process.  On failure (invariably due to lack of resources, e.g., swap  space,  memory),  fork  returns -1 to the parent process, and no child process is created. 

Forked processes exit via the exit command, just like the original process.  Forked processes are allowed to write to the log files.  If you do not disable debugging or logging in most of the processes, the result can be confusing. 

Some pty implementations may be confused by multiple readers and writers, even momentarily.  Thus, it is safest to fork before spawning processes. 

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



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

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 is a wholly owned subsidiary of Packetderm, LLC.

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