You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ime Smits <im...@iae.nl> on 2001/06/14 19:10:19 UTC
open2() write doesn't go anywhere
Sorry if this is already somewhere in the faq or just plain stupid, but I
couldn't find any satisfying answer or workaround to this. When I do
something like:
--
use IPC::Open2;
...
if($state->{pid} = open2(my $rx,my $tx,'/usr/bin/ispell','-S', '-a')) {
$state->{header} = scalar <$rx>;
...
}
...
--
Under modperl, I can see the other progam sending data back (checked Ispell,
but also did some diagnostics with others), but the mod_perl program seems
not able to send *anything* over the $tx descriptor to the other end. Tried
this with 1 MB of junk and a 'tee -a /tmp/anything' to see if this is a
buffering issue. The file is created by tee, but no data present on STDIN.
Funny thing is that the whole thing *is* working under regular perl 5.6.0.
In the list archives, about a year ago there was a similar discussion
betweeen Richard Timuss and Doug. At some point it was said that this was
addressed and fixed in cvs
(http://www.mail-archive.com/modperl@apache.org/msg05632.html).
Current setup is perl 5.6.0, Apache 1.3.20, mod_perl 1.25, but also tried
downgrading to apache 1.3.19, mod_perl 1.24, 1.24_01 and todays snapshot
(20010612). All with the same problem.
Any ideas where to start searching?
Thanks,
Ime
--
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.0, archname=i686-linux
uname='linux roambird 2.4.0 #22 wed jan 10 13:50:18 cet 2001 i686
unknown '
config_args=''
hint=previous, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O3', gccversion=2.96 20000731 (Red Hat Linux 7.0)
cppflags='-fno-strict-aliasing -I/www/include'
ccflags ='-fno-strict-aliasing -I/www/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
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags ='-L/www/lib'
libpth=/lib /usr/lib /www/lib
libs=-lnsl -lgdbm -ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/www/lib'
Characteristics of this binary (from libperl):
Compile-time options:
Built under linux
Compiled at Jan 11 2001 12:30:24
@INC:
/www/lib/perl