Hello all, I'm having trouble with following script under mod_perl 1.26 (perl 5.6.1).
use strict (); use IO::Handle (); use IPC::Open2 (); ### # # Check $username & $password against YP database sub check_password { my ($username, $passwd) = @_; my($rh, $wh); # open bi-dir pipe my $pid = IPC::Open2::open2($rh, $wh, "/usr/local/bin/ypmatch_by_ilmo", $username); $write->printflush("$passwd\n"); my $ret = <$read>; close($write); close($read); waitpid $pid, 0; return $ret; } This snippet works as expected when run from command line. When run under mod_perl the program spawned by open2 receives nothing but EOF from its stdin, but is still able to provide its output to caller process. What I'm doing wrong? Is there something similar to Apache::SubProcess::spawn_proc_prog in MP1.x? -- Antti Haapala