What are the advantages of using twistd over nohup?
Why doing
twistd -y service.tac
when I can do:
nohup sudo python my_app.py &
?
I am asking this because I faced a difficulty to use twistd, see my question here
nohup
vs. daemonization is explained beautifully in this answer, which basically can be tl;dr'd to nohup command &
being the "poor man;s way to daemonize a process, as it doesn't go through all the steps that daemonization goes through. Some minor differences:
nohup
will not become the process group leader, nor will detach itself from the session of the shell it was executed from, even if sub-shelled (i.e., (nohup command &)
vs nohup command &
, parentheses make a difference,Simply put, it is not "true" daemonization - there are some differences that may not appear problematic now, but may do if you assume in the future that the process is truly daemonized, when really it hasn't truly been, and perform operations as if it had been.