Re: Forking from Gtk
- From: Andreas Stricker <andreas stricker fela ch>
- To: gtk-app-devel-list gnome org
- Subject: Re: Forking from Gtk
- Date: Tue, 08 Jul 2008 16:36:05 +0200
Dave Howorth schrieb:
G Hasse wrote:
But I realy NEED to create a longlived process (running for a week or
month)
[snip]
IMHO, in this circumstance, you still shouldn't have the GUI start the
long-lived process. You'll probably want some other mechanism to
[re]start the process in the event something goes wrong whilst it's
running.
IMO the background process should be an usual daemon:
http://www.steve.org.uk/Reference/Unix/faq_2.html#SEC16
(you may even use something like start-stop-daemon on debian
bases systems)
If you need a restart control (e.g. if the process die),
considering a very simple daemon that starts the working
process as a direct child, wait() on them and restart it
whenever it returns. This controlling process may even
provide a socket/named pipe interface to control.
Cheers, Andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]