[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote: > On Wed, Sep 06, 2006 at 01:06:00PM +0100, Brian Raven wrote: >> Also, on a pedantic note, you cannot have multiple processes >> listening >> on a single port. Using SO_REUSEADDR means that multiple processes >> can bind to the port, but only one at a time can listen. This will no >> doubt be confused by using fork on Win32, which is emulated in >> Activestate Perl with threads. > > On a pedantic, pedantic note... :-)
... and why not. > On WIN32 this should > work using the emulated fork(), but may not due to a bug in the > rather complicated code that attempts to emulate fork() on WIN32. I know of no reason to suppose that the emulated fork on Win32 does not work in this respect. IIRC, the OP was having problems with the limit on the number of "forked" processes. > I > believe it is possible to send handles between processes, although > with all the emulation layers in Perl (file descriptors, old-style > sockets) it would be difficult or impossible from pure-Perl. I understand that this is a fairly standard Win32 technique for passing open file handles between processes. Regarding its use with Perl, see Win32API::File, specifically the functions GetOsFHandle and OsFHandleOpen. To be honest I have never used it, but it doesn't even seem particularly difficult, let alone impossible. > > Above it is suggested 'don't use fork on WIN32'. I would go further - > Don't write servers in Perl on WIN32. Use .Net, Java, or C++ as they > are all better supported, providing more native access to the > underlying system. Perl is a UNIX programming language, and breaks > down when pushed on WIN32. No, I wouldn't agree with that. Perl works just fine on Win32, even for servers. I am not sure I would even say don't use fork on Win32, but I would advise using it with care though, mainly because it is not a natural idiom for Win32. -- Brian Raven ================================= Atos Euronext Market Solutions Disclaimer ================================= The information contained in this e-mail is confidential and solely for the intended addressee(s). Unauthorised reproduction, disclosure, modification, and/or distribution of this email may be unlawful. If you have received this email in error, please notify the sender immediately and delete it from your system. The views expressed in this message do not necessarily reflect those of Atos Euronext Market Solutions. L'information contenue dans cet e-mail est confidentielle et uniquement destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail vous parvient par erreur, nous vous prions de bien vouloir prevenir l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre systeme. Le contenu de ce message electronique ne represente pas necessairement la position ou le point de vue d'Atos Euronext Market Solutions. _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
