daemons and GUIs Oh my

Timothy Grant tjg at exceptionalminds.com
Mon Apr 9 19:13:45 EDT 2001


On Mon, Apr 09, 2001 at 01:10:38PM -0700, Coy Krill wrote:
> Timothy Grant wrote:
> 
> > Hi all,
> >
> > I have a function that daemonizes itself. When called in a
> > command line environment everything works the way I would like
> > it to--It detaches itself from the console and runs in the
> > background until killed. However, when called from a button
> > in a GUI, things quickly get beyond my understanding of what's
> > going on.
> >
> > When I call the same function from a button in Tkinter, the
> > programme still detaches itself from the console, an as
> > expected, but not welcomed, the GUI quits functioning until I
> > kill the process.
> >
> > So, How do I call a process that going to be a daemon, and yet
> > maintain control of my GUI?
> 
> This all depends on what exactly you're doing with the GUI.  Is it a
> configurator/launcher, a controller, what?  If the former then use one
> of the spawn functions from os.  If the latter, then you can start the
> process via the same method for the former option and then either write
> a config file and have your daemon respond to SIGHUP (or some other
> signal) so it rereads the config file and changes behavior, or
> communicate with it via a socket and custom API to tell it what to
> change.

Thanks Coy. (BTW: nice daemon code that makes my daemons run
nicely<wink>).

The GUI is simply a configurator/launcher that has pretty check
boxes for command line options. My understanding is that spawn
are only supported on Windows boxes, is that a
misunderstanding?

-- 
Stand Fast,
    tjg.

Timothy Grant                         tjg at exceptionalminds.com
Chief Technology Officer              www.exceptionalminds.com
HyperLINq Technologies, Inc.          <><       (503) 246-3630
>>>>>>>>>>>>>Linux, because rebooting is *NOT* normal<<<<<<<<<
>>>>This machine was last rebooted:  13 days  1:21 hours ago<<




More information about the Python-list mailing list