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.


In reply to Executing command line script in Eclipse or as Win32::Daemon does not work by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.