in complete agreement with clintp, that the pid file creation and file locking is about as standard as can be. The only problem is that it only works if a the program in question creates the pid file everytime, or is always started by the same application. If this is Win32 specific, checkthe Win32 modules on CPAN, as there are a few that do basic OLE work.

For simpler programs, where OLE is not available, and findWindow style functions are not used (for whatever reason), the last would be reading the process list. This is a few of the things i can think of, including the downsides to a few.
OH, a sarcasm detector, that’s really useful

In reply to Re: Exec or system functions by MZSanford
in thread Exec or system functions 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.