in reply to inetd spawned perl problem
Assuming this is the case, you should have a process use select() or IO::Select::can_read to monitor the socket. Without knowing which O/S and version of Perl you are running this on, I can't promise this will work, but my suggestion would be to try this:
If the can_read() returns before the SIGCHLD, then the socket has closed (assuming you are not expecting more data!) and you can kill the child process.Right before you do the open(RCMD,...), fork(). Have the parent do a can_read on STDIN. Have it be prepared to receive SIGCHLD. The child just runs the code that you give above, then exits().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: inetd spawned perl problem
by vasu (Novice) on May 09, 2003 at 16:47 UTC | |
by Thelonius (Priest) on May 09, 2003 at 18:10 UTC | |
by vasu (Novice) on May 12, 2003 at 18:48 UTC |