in reply to forking daemon under windows

Hi Monks,

After searching little more ... I used perl threading but the problem is it's waiting for the thread to complete if I join() else if I detach() then I dont get the returned data.

Is there any way ... I can start the thread, come back to do some other thing and then wait for the thread to end and do something else and completes.

.

Replies are listed 'Best First'.
Re^2: forking daemon under windows
by FloydATC (Deacon) on Nov 30, 2009 at 13:13 UTC
    It sounds like you want to poll your thread and not join it until it is joinable. Look into thread states, is_joinable() is probably what you seek.

    -- Time flies when you don't know what you're doing
      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

        Any idea guys?