[Perl] A wierd bug on system interaction

Amir Abiri amir at abiri-e.com
Sun Mar 31 18:25:31 PST 2002


I am having an annoying problem with ``/qx{}/open "CMD |". They all act the
same in this respect:

code snippet:

@lines = `adsl start`
printf @lines;

adsl is another perl script that launches pptp and all the rest of the
things that has to do with connecting to the internet.

This code hangs. The adsl script, when it finishes it goes zombie, and the
calling perl script doesn't seem to notice that fact. I get a CHLD signal
and can process it, but no matter what i do the script keeps hanging on the
backsticks line.

The adsl script works just fine by itself, no prblems there. and the same
code snippet would work with a nother, simpler command. I can't use system()
and wait() since i need the command's output.

Any ideas ?

"God is a programmer".

More information about the Perl mailing list