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

Re: Daemon wrapping util



On Thu, Oct 04, 2001 at 05:20:48PM +0200, Aviram Jenik wrote:
> 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?

An easy solution would be to run a detached 'screen'[1] session. This grants
the process running under screen the benefits of any ordinary daemon.
As for sending its output to syslog, you could pipe its output to the 
logger utility, which is accounted for in the bsdutils package on my Debian
system. logger sends messages from stdin to your (or anybody else's) syslogd.

	Regards, Yotam Rubin

[1] ftp://ftp.uni-erlangen.de/pub/utilities/screen

> 
> - 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