rovf has asked for the wisdom of the Perl Monks concerning the following question:
We are using a set of external binaries on Windows to, roughly speaking, control a job management system. For this discussion it is sufficient to know that there exists a bkill.exe, which can be used from the Windows command line to kill a job:
kills the job with number 4711. If this job has already terminated at the time of killing, we get not surprisingly the messagebkill.exe 4711
on standard error. Now comes the funny thing: When I call the program from Perl, say withJob <4711>: Job has already finished
I get the following answer under ActiveState Perl 5.10:perl -lwe "system(qq(bkill 4711))"
Even without knowing anything about the internals of bkill.exe, I wonder why this error is displayed (after all, it obviously *could* spawn bkill.exe), and why this is considered as "No error".Job <4711>: Job has already finished Can't spawn "bkill.exe 4711": No error at -e line 1.
Since I also happen to have Perl 5.7 installed, I tried it with this version too, and here, the output looks even funnier:
This gives some hint: Maybe Perl 5.7 thought too that it could not spawn the process, but maybe - different to 5.10 - retries once until giving up.Job <4711>: Job has already finished Job <4711>: Job has already finished Can't spawn "cmd.exe": No such file or directory at -e line 1.
The problem does not appear so far with any other program (and also with bkill only in this certain circumstance - for instance, "killing" a job which has never existed, or killing an existing job, does not show any unusual output). Now of course we have no oddities what is going on within bkill - I don't have the source code -, but no matter what it is, how could possibly be Perl tricked into thinking that it could not spawn the process?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What error is "No Error"
by almut (Canon) on Nov 03, 2008 at 15:02 UTC | |
by rovf (Priest) on Nov 03, 2008 at 15:08 UTC | |
|
Re: What error is "No Error"
by ig (Vicar) on Nov 03, 2008 at 16:04 UTC | |
|
Re: What error is "No Error"
by Krambambuli (Curate) on Nov 03, 2008 at 15:04 UTC | |
by rovf (Priest) on Nov 03, 2008 at 15:16 UTC | |
by Krambambuli (Curate) on Nov 03, 2008 at 15:23 UTC |