Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow Monks,
since I cannot find help on this matter on stackoverflow(http://stackoverflow.com/questions/11671370/perl-not-executing-command-when-in-debugger-or-as-a-win32daemon) and I did find only one unanswered question on the web regarding this problem, I will now try my luck here.
I have a Perl program (CertNanny) that executes a binary (sscep). If I try to run it in my Eclipse debugger (EPIC), the binary reports a return code of "53" (after $? >> 8). However, if I do call another binary (e.g. "dir" or an absolute path to another binary) it works. And if I make another small perl script that only calls the sscep binary - this also works.Furthermore sscep does not have a return code of "53". Here is what I call:
my $cmd = q("C:\path\to\sscep.exe") open FH, "$cmd |" or die "Couldn't execute $cmd: $!\n"; while(defined(my $line = <FH>)) { chomp($line); print "$line\n"; } close FH;
The whole program works perfectly if executed from the command line. But as soon as I launch the debugger or install it as a service (Win32::Daemon), it reports this weird error. The software itself does not get executed.
So my core question is: Why is it reporting the error "53", what could be the reason for this or what does it mean. Since my wisdom on Perl ends here, I come to you for help and advice.
Thank you in advance.
Regards, Florian
P.S.: If I missed any important detail, please also take a look at my SO question, as there are a lot (possibly superflous) details on this issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Executing command line script in Eclipse or as Win32::Daemon does not work
by BrowserUk (Patriarch) on Jul 27, 2012 at 16:05 UTC | |
by Anonymous Monk on Jul 30, 2012 at 08:07 UTC | |
by BrowserUk (Patriarch) on Jul 30, 2012 at 13:21 UTC | |
|
Re: Executing command line script in Eclipse or as Win32::Daemon does not work
by bulk88 (Priest) on Jul 27, 2012 at 16:40 UTC | |
by Anonymous Monk on Jul 30, 2012 at 08:54 UTC | |
by bulk88 (Priest) on Jul 30, 2012 at 16:25 UTC |