HTML filtering

josh hoblitt jhoblitt at
Thu Jul 18 19:07:36 CDT 2002

Perl CookBook page 628:

"On some operating systems, notably Solaris, you connot have multiple
children doing an accept on the same socket.  You have to use file
locking to ensure that only one child can call accept at any particular

Randal's code doesn't prefork multiple children so that can't be exactly
whats going on but atleast it's a clue.
jhoblitt at

----- Original Message -----
From: merlyn at (Randal L. Schwartz)
Date: Thursday, July 18, 2002 1:23 pm
Subject: Re: HTML filtering

> >>>>> "josh" == josh hoblitt <jhoblitt at> writes:
> josh> I discovered something interesting: HTTP:Daemon doesn't work 
> correctlyjosh> on perl 5.6.1/solaris 8.  The object will allow one 
> connection then die
> josh> on the next attempt to call accept.  I tried setting some
> josh> IO::Socket::Inet options with no luck.  The problem is fairly 
> lowleveljosh> as the OS is still holding the socket open for 
> sometime after the code
> josh> exits.  (I verified that the code still works on perl 
> 5.6.1/linux 2.4)
> One of my programs (the preforking server) broke under some OS
> releases because flock() on the master socket isn't supported
> properly.  I had to switch to including __END__ in the program and
> then flocking DATA in the same way (a cheap trick, but effective :).
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 
> 777 0095
> <merlyn at> <URL:" 
> target="l">>Perl/Unix/security 
> consulting, Technical writing, Comedy, etc. etc.
> See for onsite and open-enrollment Perl 
> training!TIMTOWTDI


More information about the Pdx-pm-list mailing list