[clug] How to "daemonize" a process
jepri at webone.com.au
Wed Jul 2 23:27:06 EST 2003
You write a program that reads in the contents of the input directory
once per second then processes any files that it finds in there.
Don't forget to remove the files before you go back to scanning the
On 2003.07.02 19:35, Michael.James at csiro.au wrote:
> I have a need to run many (~1000) different jobs
> through the same program
> which unfortunately is only licensed on another machine.
> I've set it up to rsync the work across,
> ssh a command to get it done
> and rsync the result file back
> but it's very slow.
> It's not the actual work of executing the function
> or the overhead of ssh setting up the connection,
> it's running the startup scripts
> before the package's command springs into life.
> How can I have an initialized, ready daemon
> that I can remotely call down onto a new pair of files?
> I last saw something like this
> wrapping the scanning function
> of an anti virus mail gateway.
> It would have killed the machine
> to load all the virus definitions
> for each attachment,
> so the attachments were stripped out
> and an already running daemon
> was invoked onto each file.
> A solution in perl would be welcome...
> Michael James michael.james at csiro.au
> System Administrator voice: 02 6246 5040
> CSIRO Bioinformatics Facility fax: 02 6246 5166
More information about the linux