Re: Possible bug in 5.8.6: accept/fork/wait/exit ?
- From: xhoster@xxxxxxxxx
- Date: 06 Jun 2005 02:52:25 GMT
james@xxxxxxxxxxxxx wrote:
> Any multi-process/networking gurus here?
>
> I'm trying to write a simple forking HTTP proxy but am having a problem
> when running it with Perl 5.8.6. The program spontaneously exits after
> one or a few connections. The problem does not happen when I use Perl
> 5.6.1.
I also don't see the problem on 5.8.0 or 5.8.3.
....
> shell window. Now, repeat the telnet command over and over. After 1-20
> telnets, the script exits with no message.
That is not surprising, since you don't ask for a message.
> for ( ; $paddr= accept(S_CLIENT, S_LISTEN) ; close S_CLIENT) {
for ( ; $paddr= accept(S_CLIENT, S_LISTEN) or die $!; close S_CLIENT) {
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- Follow-Ups:
- Re: Possible bug in 5.8.6: accept/fork/wait/exit ?
- From: jmarshall . com
- Re: Possible bug in 5.8.6: accept/fork/wait/exit ?
- References:
- Possible bug in 5.8.6: accept/fork/wait/exit ?
- From: James Marshall
- Possible bug in 5.8.6: accept/fork/wait/exit ?
- Prev by Date: Possible bug in 5.8.6: accept/fork/wait/exit ?
- Next by Date: Re: script help - stripping trailing spaces in exisitng script
- Previous by thread: Possible bug in 5.8.6: accept/fork/wait/exit ?
- Next by thread: Re: Possible bug in 5.8.6: accept/fork/wait/exit ?
- Index(es):