pythontwistednohuptwisted.internettwistd

twistd and nohup &: what is the difference?


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


Solution

  • 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:

    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.