Loading ...
Sorry, an error occurred while loading the content.
 

Re: [soaplite] Forking daemon with win32 perl?

Expand Messages
  • Weidong Wang
    Here is the story. fork() on win32 is an emulation with threads. As such, if any process is not finished, the whole program will not exit. This presents a
    Message 1 of 3 , Jun 25, 2001
      Here is the story.
       
      fork() on win32 is an emulation with threads. As such, if any "process" is not finished, the whole program will not exit. This presents a problem for me, as I wanted my SOAP code to launch a new daemon under certain condition and return the port number back to the soap clients. That does not work since the new deamon does not return, so the whole perl process does not return. The result is, my soap client waits forever.
       
      The solution, for win32, for this problem is to forget fork() and use Win32::Process to create a new process. That works, though it makes my code non portable.
       
       
      Weidong
       
      ----- Original Message -----
      Sent: Friday, June 22, 2001 4:23 PM
      Subject: Re: [soaplite] Forking daemon with win32 perl?

      Hi, Weidong!

      I would also like to hear opinions on that. ActiveState?

      I finished non-blocking TCP daemon and would like to add non-blocking
      HTTP daemon. It might help you to get the result you want. Only I/O
      is nonblocking, processing itself done by single thread, but this
      solution works on almost any platform.

      Best wishes, Paul.

      --- "Dr. Weidong Wang" <wwang@...> wrote:
      > Has anyone had good experience getting the forking daemon to work
      > on win32 perl?
      >
      > I have been trying to get fork() to work reliably on win32 (win2k
      > box), but it does not work as I expected. I first tried with the
      > non-forking daemon, but call fork() in one function, The parent
      > process is supposed to return quickly, while the child process to
      > start anothr daemon program. What I got was, the new daemon would
      > start, but the parent never returned anything, so the client just
      > waited.
      >
      > Any ideas? Thanks.
      >
      > Weidong
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Get personalized email addresses from Yahoo! Mail
      http://personal.mail.yahoo.com/


      To unsubscribe from this group, send an email to:
      soaplite-unsubscribe@yahoogroups.com



      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    Your message has been successfully submitted and would be delivered to recipients shortly.