Re: The assignment of command output to an array hangs.



You are crude, Paul. Please don't ever reply to my any further
postings. I never suggested
that Perl had a bug or that I wanted you to come back and tell me that
Perl had a bug. All I
wanted to know was how to debug problem further. If I could provide
code as it is I could
have done it earlier.

Thanks for being so nice.

Paul Lalli wrote:

kaleem wrote:
Thanks for respoding Paul. Please note that I'm not a novice and I'm
sure of what I'm
saying. I mean I have checked all these things which you are asking me
to check.
Also, on further investigation I've found that after the KornShell
script completes,
it becomes defunct (zombie). It means that its parent hasn't waited for
it. When
I terminate the Perl script, this zombie process goes away.

This is what my code looks like:

cmd ("/abc/xyz/def 2>&1");

/abc/xyz/def is a KornShell script.

The cmd looks like this:

sub cmd
{
$command = shift;

....

@results = `$command`
...

}

Please note that the same code works if I just call /abc/xyz/def using
cmd in
another Perl script or using 'perl -e'. My actual script has lots of
other code in addtition to calling /abc/xyz/def.

Let me know what you think.

I think you're very arrogant to assume that you have not made any
mistakes, novice or expert. I asked you to post a short-but-complete
script that we can run to test your problem, and you instead gave me
pseudo code that simply restated what you said in your first post. You
seem to be wanting us to come back and say "yup, there's a bug in Perl"
rather than to actually help you diagnose what you may have done wrong.

Do you want a solution to your problem, or do you want to avoid
bruising your ego?

Paul Lalli

P.S. And to those who think this post was rude, yes it was. But in my
opinion not undeservingly so.

You are crude, Paul. Please don't ever reply to my any further
postings. I never suggested
that Perl had a bug or that I wanted you to come back and tell me that
Perl had a bug. All I
wanted to know was how to debug problem further. If I could provide
code as it is I could
have done it earlier.

Thanks for being so nice.

Paul Lalli wrote:

.



Relevant Pages