title: What is the reason for performing a double fork when creating a daemon?
body: <p>I'm trying to create a daemon in python. I've found the <a href="https://stackoverflow.com/questions/473620/how-do-you-create-a-daemon-in-python">following question</a>, which has some good resources in it which I am currently following, but I'm curious as to why a double fork is necessary. I've scratched around google and found plenty of resources declaring that one is necessary, but not why.</p>
  
  <p>Some mention that it is to prevent the daemon from acquiring a controlling terminal. How would it do this without the second fork? What are the repercussions?</p>