Also try:
use strict; use warnings; sub debuf{ select( ( select( $_[0] ), $|++ )[0] ) } my ($child, $parent); pipe($child, $parent) or die; debuf( $parent ); my $pid = fork(); die "fork() failed: $!" unless defined $pid; if ($pid) { close $child; } else { close $parent; print "child waiting\n"; my $read; read($child, $read, 1); print "child exiting\n"; exit(0); } print $parent "exit now\r\n\r"; print "parent going to wait\n"; waitpid($pid, 0);
In reply to Re: pipe fork win32
by BrowserUk
in thread pipe fork win32
by bulk88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |