[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Daemon wrapping util



Perhaps you can write a small shell script (or perl script - there are
more powerful features you can use with Perl). 
This script will run the program endlessly, and when output occurs you
can trap and distinguish between 
STDERR and STDOUT and put them into use with "logger", which will give
you complete (?) access to system logging
facility ("man logger"). 
IMHO, Perl is your buddy (just a teaser - "fork" is built in function in
Perl), but obviously you wouldn't go and start learn 
Perl just for that (or would you?... :-) .

Boaz.

-----Original Message-----
From: Aviram Jenik [mailto:aviram@jenik.com]
Sent: Thursday, October 04, 2001 5:21 PM
To: linux ILUG
Subject: Daemon wrapping util


Hi,

I'm looking for a way to make one of my programs into a daemon. I would
like to do that without changing any source code.
Currently, the program runs infinitely (polling on a database for
changes). It needs no console input, and outputs to stdout. I would like
to find a reliable way to run it, preferably sending output to syslog
(WITHOUT changing source code), and possibly check if its running and
run it again if it sigfaults (not that it should :-))
A solution involving nohup is nice, but lacks the other two features and
this is why I'm looking for a possibly better solution.

Any idea of such good daemon wrappers?

- Aviram


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il


To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il