[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[ID 20000126.008] forking open breaks in 5.005_63
This is a bug report for perl from dcd@tc.fluke.com,
generated with the help of perlbug 1.27 running under perl 5.00563.
-----------------------------------------------------------------
[Please enter your report here]
The following contrived code works in 5.005_57 but blocks (on a 'STDIN' read)
in the open/fork in the second call to sub cpp.
It is interesting to note that
if the code in the subroutine is expanded inline
then it works. (my guess is there may be some 'state' associated
with the open itself.
$|=1;
sub cpp
{
my $file = shift;
print "cpp $file\n";
if (open(FROM_CPP, "-|") == 0) {
print STDERR " child $file\n";
print "$file\n";
exit;
}
print STDERR " parent\n";
while (<FROM_CPP>) {
print "FROM_CPP:$_";
}
close(FROM_CPP);
}
cpp 'segment.h';
cpp 'foo';
I expected
cpp segment.h
parent
child segment.h
FROM_CPP:segment.h
cpp foo
parent
child foo
FROM_CPP:foo
but all I get with 5.005_63 is
cpp segment.h
parent
child segment.h
FROM_CPP:segment.h
cpp foo
parent
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00563:
Configured by dcd at Tue Dec 14 16:21:58 PST 1999.
Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration:
Platform:
osname=linux, osvers=2.3.33, archname=i686-linux
uname='linux dd 2.3.33 #1 tue dec 14 15:38:25 pst 1999 i686 '
config_args='-Doptimize=-g -de -Dcf_email=dcd@tc.fluke.com'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
use64bits=undef usemultiplicity=undef
Compiler:
cc='cc', optimize='-g', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /shlib /lib /usr/lib
libs=-lgdbm -ldbm -ldb -ldl -lm -lc
libc=/lib/libc.so.5.4.44, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl 5.00563:
/usr/local/lib/perl5/5.00563/i686-linux
/usr/local/lib/perl5/5.00563
/usr/local/lib/site_perl/5.00563/i686-linux
/usr/local/lib/site_perl
.
---
Environment for perl 5.00563:
HOME=/home/dcd
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/dcd/bin:/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/usr/games:/usr/local/samba:/home/hobbes/tools/scripts:/home/hobbes/tools/linux:/usr0/hobbes/tools/scripts:/usr0/dcd/bin:/apps/general/bin:/usr/public
PERL_BADLANG (unset)
SHELL=/bin/bash
- Follow-Ups from:
-
Gurusamy Sarathy <gsar@ActiveState.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]