[Tutor] Python Daemon

Kalle Svensson kalle@gnupung.net
Mon, 12 Mar 2001 00:53:37 +0100


Sez Deirdre Saoirse:
> On Mon, 12 Mar 2001, Kalle Svensson wrote:
> 
> > Sez Pedro Diaz Jimenez:
> > > In order to make a daemon, you've got to fork() and kill the father. Then
> > > you have a child in the background
> >
> > That's not true, at least not with my definition of daemon, basically
> > a process that is left running.  Just start the process in the
> > background (with an &, like "python script.py &") and exit the shell.
> > Perhaps with older shells you'll have to run it through nohup or
> > something, but I don't know.
> 
> That doesn't *necessarily* work -- try logging out from that shell
> afterwards. In many cases, it'll be gone. Screen is a workaround, but not
> suitable for a daemon.

Perhaps.  I thought nohup would work when the shell doesn't help you, but
I've never been unfortunate enough to have to try it.

Peace,
  Kalle
-- 
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
 [ Not signed due to lossage.  Blame Microsoft Outlook Express. ]