It sounds like you might be on a UNIX or Linux system. If you are your system probably has syslog. You can send messages to syslog with the (standard) module Sys::Syslog. Your other program can watch for the log message to be sent to its destination.

Depending on how portable you want to be and whether the HUPs are to be sent by humans or software you can also use semaphores. These are bits accessible to multiple programs that can be used to send one bit messages (e.g. "I processed the file"). See IPC::Semaphore. One item you need to manage is when to set the bit back to zero. The semaphore system has ways to deal with this (because semaphores are in groups), but the best approach to use depends on how your daemon and the sender of the HUP interact.

It is interesting to note that while many programs do the log file or syslog thing, the sending programs often run "open loop" -- that is, they don't actually check that the update happened, they just assume it did. It is good to check it, though...

HTH, --traveler


In reply to Re: How do I get status from daemon by traveler
in thread How do I get status from daemon by tgummels

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.