How to pass a file descriptor to another process

2002-10-25 Thread vishal mittal
Hi, I have a process that forks off another process. Both these processes maintain a bidirectional pipe between them. How can I pass an open file descriptor from the parent to the child so that the child can do all the reading from that file descriptor? Thanks -Vishal ___

Converting IO::Handle to filehandle

2002-10-16 Thread vishal mittal
Hi, I have something like this my $child = new IO::Handle; When I try to redirect this handle to a filehandle using open(MY_DESCRIPTOR, ">&$child"); it gives me an error. What is it that I am doing wrong ?? Thanks -V __ Do you Yahoo!? Faith H

Problem with redirection

2002-10-15 Thread vishal mittal
Hi, I am encountering a problem with this piece of code that I have written for forking multiple processes and making all the child processed communicating with the parent process... ** my($child_fh, $parent_fh) = (new IO::Handle, new IO::Hand

Redirecting STDOUT

2002-10-15 Thread vishal mittal
Hi, I am encountering a problem with this piece of code that I have written. ** my($child_fh, $parent_fh) = (new IO::Handle, new IO::Handle); socketpair($child_fh, $parent_fh, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair failed

Redirecting STDOUT

2002-10-15 Thread vishal mittal
Hi, my($child_fh, $parent_fh) = (new IO::Handle, new IO::Handle); socketpair($child_fh, $parent_fh, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair failed: $!"; $child_fh->autoflush; $parent_fh->autoflush; if (my $pid = fork) { close $parent_fh; $fh_s

Redirecting STDOUT

2002-10-15 Thread vishal mittal
Hi, my($child_fh, $parent_fh) = (new IO::Handle, new IO::Handle); socketpair($child_fh, $parent_fh, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair failed: $!"; $child_fh->autoflush; $parent_fh->autoflush; if (my $pid = fork) { close $parent_fh; $fh_s