Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (47.6k points)

Searching on Google reveals x2 code snippets. The first result is to this code recipe which has a lot of documentation and explanation, along with some useful discussion underneath.

However, another code sample, whilst not containing so much documentation, includes sample code for passing commands such as start, stop and restart. It also creates a PID file which can be handy for checking if the daemon is already running etc.

These samples both explain how to create the daemon. Are there any additional things that need to be considered? Is one sample better than the other, and why?

1 Answer

0 votes
by (106k points)

You can use the reference implementation of PEP 3143 (Standard daemon process library) is to create a daemon in Python.

Related questions

0 votes
1 answer
asked Aug 31, 2020 in Big Data Hadoop & Spark by Kasheeka (32.1k points)
0 votes
4 answers
0 votes
1 answer
asked Feb 20, 2020 in DevOps and Agile by lassykumar (2.3k points)
0 votes
2 answers
0 votes
1 answer
asked Oct 14, 2019 in Python by Sammy (47.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...