How to use Win32::pipe (or better any "fork" alternatives on NT?)?

Geoff Hart ghart@siemens-psc.com
Tue Jan 6 11:11:00 GMT 1998


I have a (UNIX) Perl script which creates a few pipes, then forks.  The
child
opens STDOUT to one pipe, and STDIN to another, then "exec"s a command (GNU
make).
The parent then continues one, occasionally feeding and reading those pipes.

To port this to NT, I thought I'd try using the Win32::Pipe package.  I
grabbed
it, and tried to install it but when trying one of the test cases I get:

bash$ perl Server.pl
Error: Parse exception

I expect that means I installed one of the .pm or .pll packages incorrectly
(CR/LF problem?).

But, then maybe Win32::Pipe has a problem (I searched the net for references
to it but didn't find many at all).

In anywise, maybe there's a better way to do what I want.  Any suggestions
(here's my "child process" code):

# earlier (in the "parent") I did: pipe (CMD_R, CMD_W); pipe (ACK_R, ACK_W);

    close (CMD_R);             close (ACK_W);
    open (STDOUT, ">&CMD_W");  open (STDIN, "<&ACK_R");
    close (CMD_W);             close (ACK_R);
    select (STDOUT); $| = 1;

    exec ("if $GMAKE -ref $make_file @PARM_TARG;then :;else echo ERROR;fi");

Thanks,
Geoff


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list