(Using AS Perl 5.8.6, WinXP Pro)

I'm installing a Perl app as a Win32 Service via Win32::Daemon. Got that all working fine (tho ithreads seem to be doing odd things).

However, when I open the Control Panel->Administrative Tools->Services tool and check on the Recovery properties, they all indicate "Take no action" when the service fails. I'd like to have the service simply restart (up to 3 times, then fail hard). I can't find any i/f to Win32::Daemon::CreateService() to specify that behavior.

Does anyone know of a hash parameter to specify that recovery behavior ?

Update:

After some research, I've discovered the short answer is, "No.".

According to this, setting the the autorecovery actions requires an API call that grep indicates doesn't exist in Win32::Daemon. So either I hack Win32::Daemon, or I just tell my users to open the Admin->Service tool and set things themselves. <sigh/>. Guess it'll be the latter, as I don't have time for the former.


In reply to Win32::Daemon::CreateService to set autorecovery ? by renodino

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.