SPUG: Forked Children talking back to the parent?
John Labovitz
johnl at meer.net
Wed Jan 17 13:20:39 CST 2001
To handle the case of a child "hanging," you might consider using
IO::Select (a front-end to the select(2) system call) to manage the
connections.
With IO::Select, you can "watch" several file-handles at once, and
then read only from ones that are ready. You can also specify a
timeout value, so if none are ready to read, you can figure out which
haven't responded for a while and kill() them (or whatever).
There's an example program in the manpage for IO::Select (which comes with
standard perl, btw).
john
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list