Summary


 
Network Programming with Perl
By Lincoln  D.  Stein
Slots : 1
Table of Contents
Chapter  2.   Processes, Pipes, and Signals

    Content

This chapter introduced three topics that we will use throughout this book.

Processes correspond to an instance of a running program. Perl can create new processes via its system() and fork() commands, or replace the current process with a different one with exec () .

Pipes are I/O connections between two processes. A pipe looks and acts like a filehandle, but it is connected to another process rather than to a file. If a pipe is opened for reading, data read from it is taken from the standard output of the process at the other end. If a pipe is opened for writing, data printed to it is received by the other process on its standard input.

Signals provide programs with notification of exceptional conditions, among which are PIPE errors and other I/O- related problems. Signals are also useful for timing out long-running operations and catching urgent requests from the user . You can manage incoming signals by installing signal handlers in the %SIG hash, and you can send signals to other processes (or your own) using the kill() function.

The next chapter goes into the particulars of Berkeley sockets before leading into a full discussion of TCP networking.


   
Top


Network Programming with Perl
Network Programming with Perl
ISBN: 0201615711
EAN: 2147483647
Year: 2000
Pages: 173

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net