in reply to Re^2: forking daemon under windows
in thread forking daemon under windows

Hi,

Thanks for the reply. I am facing a problem with threading. I am redirecting to a different page and then closing STDOUT, STDERR and calling the function in thread,detaching it...so that it kinda runs in background.

But once I run the CGI script...nothing happens ... in process list I dont see any perl.exe process. perl process is exiting.

Is it a bug? Or I am doing something wrong. Thanks

Replies are listed 'Best First'.
Re^4: forking daemon under windows
by Anonymous Monk on Nov 30, 2009 at 16:48 UTC
    Any idea guys?

      Sure. "If it hurts, stop doing it."

      Windows has no concept of daemons, services are the closest thing to a Unix deamon. So maybe you want a service that you can control from your Perl script.

      A second problem with Windows is that it does not know the brilliant concept of "fork() and exec()", but instead has a ridiculously large and ever increasing number of functions and macros that wrap each other and finally start a new process with a huge load of mostly useless parameters. Short, fork() just does not work on Windows, even if newer perl versions have a pretty neat emulation. But it's just an emulation and things go wrong amazingly fast as soon as you expect it to do more than just creating a new instance of your Perl script.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

        OHH!!! NO

        does that mean what I am trying to do is not achivable under Windows?

        Thanks anyways for your reply