open2 fails with perl5 on HP-UX?? 
Author Message
 open2 fails with perl5 on HP-UX??

This seems very straightforward to me, but it doesn't work on my
HP (HP-UX 9.03) running perl5

#!/usr/bin/perl

require "open2.pl";

$childPid = &open2('CHREAD','CHRWRITE',"dumb");
print "pid = $$, child = $childPid\n";

$in = <CHREAD>;
print $in;

print CHWRITE "foo\n";

$in = <CHREAD>;
print $in;

**************************

now here's "dumb"

#!/usr/bin/perl

print "output line 1\n";
$in = <STDIN>;
print "user typed $in\n";

*****************************

so what gives?  It just hangs, never returning even the
first line.  if I take out the read ($in = <STDIN>) it
works fine, returning both lines of output.  the
dumb script works interactively.

I don't think this is a problem with open2 because I
spent a day trying to get my own version to work before
I even knew open2 existed and had exactly the same
behavior.

is this a bug?  is there a way around it?  please mail
flames to


or post if of general interest.

-chris



Sat, 19 Apr 1997 04:09:42 GMT  
 open2 fails with perl5 on HP-UX??

It would be a big help if anyone can confirm that those
scripts work as expected on _ANY_ system in _ANY_ version
of perl.  This behavior now exhibits itself on SunOS running
perl 4.0 and HP-UX running perl 5.000.  This is maddening.

What I would expect it to do is for my test (parent script)
to output:

Quote:
> test

in = output line 1

in = user typed foo

that is, the child writes, reads and writes again.  instead
it hangs, the parent gets nothing unless I take out the child's
read.  Is this what's supposed to happen?

-chris


(please show me that this is a stupid newbie error).

thanks.



Sun, 20 Apr 1997 08:02:13 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Perl5 build fails for HP-UX 8

2. op/dbm test fails on HP 735 under HP-UX 9.01

3. Perl 4.003 fails dbm test - HP 825, HP-UX 2.1

4. Compile perl5 on HP 7xx/HP-UX 8.0 ?

5. perl 3.0 patch level 14 fails on HP/UX 7.0

6. make test of DBD::Oracle 1.12 fails with HP/UX 11.00

7. HTML-Parser on HP-UX fails make test

8. HP-UX 10.20 aCC / Config script fails on compiler check

9. HELP! 5.003 install failed on HP-UX 9.07

10. Perl 5.002, HP/UX 10.10, test 22 of op/misc fails

11. NDBM problems with Perl5 on HP-UX

12. Problem Building Perl5 on HP-UX

 

 
Powered by phpBB® Forum Software