Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Is fork() supported in win98?

( #19954=categorized question: print w/ replies, xml ) Need Help??
Contributed by Anonymous Monk on Jun 27, 2000 at 07:39 UTC
Q&A  > network programming


Description:

For a small (ultra efficent) web server spawning new sockets and transfering the connection to the new socket (child): you need fork to do that, but is there a way to do it without?

Answer: Is fork() supported in win98?
contributed by davorg

The latest builds of ActivePerl (the 5.6 series) now support fork on Win98

Answer: Is fork() supported in win98?
contributed by Corion

While we are talking about efficiency, fork() is really not the speed efficient way under Win32, as fork() is not a native OS feature. fork()ing under Win32 currently means that the whole process space is copied, at least all data has to be copied into the forked child.

Personally, I found besides the performance issues also some weird behaviour with sockets when using fork(), but that may have been due to using Windows 98, strange Perl code or the phase of the moon.

Answer: Is fork() supported in win98?
contributed by Shendal

I have played around with fork on WinNT. It is advertised as a beta feature, and I strongly suggest that you take them at their word. While programming my chatterbox client, I initially tried this new fork() feature, but it wouldn't work for anything but the simplest forks. I couldn't isolate the problem, but I suspect that it is related to certain modules not being "fork" compatible, or perhaps socket problems such as Corion had described above.

All in all, I'd suggest not using this for production work and look at it as a curiosity. Hopefully, features such as fork (and alarm!) will be fully (and reliably) implemented.

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (4)
    As of 2014-07-24 04:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (157 votes), past polls