Travis Griggs <travisgri...@gmail.com>:

> nohup python3 myMain.py 2>&1 > /var/log/mylog.log &

I don't recommend this (ubiquitous) technique. You should keep your
daemon in the foreground until it has reserved and initialized all the
resources it needs and daemonize only then. That way the caller does not
have to guess when the service is really available.

The proper daemonization procedure is here:

  <URL: http://code.activestate.com/recipes/66012-fork-a-dae
  mon-process-on-unix/>

Now, with the new systemd standard, there is a way for you to inform the
system when a service is up even after backgrounding. I have no personal
experience with that technique.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to