lsnrctl from perl [message #103561] |
Thu, 15 January 2004 06:50 |
Laurent Demaret
Messages: 1 Registered: January 2004
|
Junior Member |
|
|
-------------cut-----------------
local (*ReaderFH, *WriterFH);
my $pid = open2(*ReaderFH, *WriterFH, "$ENV{ORACLE_HOME}/bin/lsnrctl");
print WriterFH "start LISTENER_INT920n";
print WriterFH "exitn";
close WriterFH;
while (<ReaderFH>) {
print "$_" if $DEBUG;
}
close ReaderFH;
waitpid($pid, 0);
-------------cut-----------------
Hi,
I'm trying to use 2 ways communication in perl to interact with lsnrctl using this program.
That piece of code works well when I issue a "stop LISTENER_INT920" or "status LISTENER_INT920" command instead but when I use "start LISTENER_INT920", it hangs.
I guess it hangs into the while loop because lsnrctl start command forks to create the listener process itself. if I kill -9 the listener process from another window, then the program continues.
any ideas how to solve this?
PS: LISTENER_INT920 is my listener name
|
|
|