Queryable Daemon

garabik-news-2005-05 at kassiopeia.juls.savba.sk garabik-news-2005-05 at kassiopeia.juls.savba.sk
Sat Aug 1 23:14:59 CEST 2009

MRAB <python at mrabarnett.plus.com> wrote:
> Justin DeCell wrote:
>> Hi All,


>> The only other way I thought 
>> of would be to write to a file on disk every so often from the daemon 
>> and just read the from the query process but it seems like there should 
>> be a more elegant way to do this...
>> By the way I'm writing this for unix only so there's no need to worry 
>> about compatibility with other os'.
> Instead of a file descriptor, how about a socket? A certain port at
> ""?

Or a Unix domain socket.

Or let the demon catch signal, say SIGUSR1 and dump its state to a file.
A bit easier programming that a socket, a bit less elegant.

| Radovan Garabík http://kassiopeia.juls.savba.sk/~garabik/ |
| __..--^^^--..__    garabik @ kassiopeia.juls.savba.sk     |
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!

More information about the Python-list mailing list