in reply to Win32: Redirect STDOUT to socket

Using: ActiveState Perl v5.10.0 built for MSWin32-x86-multi-thread.

and socketpair($_[0], $WRITE, AF_UNIX, SOCK_STREAM, PF_UNSPEC)

and fork

Almost certainly isn't going to work.

Consider using Win32::SocketPair, but trying to use fork to create a deamon isn't going to work because fork is emulated using threads on Win32.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Win32: Redirect STDOUT to socket
by repellent (Priest) on Feb 09, 2009 at 17:50 UTC
    Thanks, BrowserUk. Yes, I know the path of forking on Win32 is fraught with doom :)

    Just curious at this point: how does Perl do qx() in Win32? We can't emulate it another way? Please see my OP update.
        Thanks so much for the links! I tried to have the newly created process inherit filehandles from the calling process with no luck. Perhaps I'm missing something? See UPDATE #2.