redirecting stdout and stderr to /dev/null

Ben Finney ben+python at benfinney.id.au
Sat May 7 21:21:10 EDT 2016


Jim Dodgen <jim at dodgen.us> writes:

> I'm have problems redirecting stdout and stderr to /dev/null in a
> program that does a fork and exec.

You may be interested in the ‘python-daemon’ library
<URL:https://pypi.python.org/pypi/python-daemon/>. It takes care of all
the fiddly bits to turn your program into a well-behaved Unix daemon.

-- 
 \     “I wish there was a knob on the TV to turn up the intelligence. |
  `\          There's a knob called ‘brightness’ but it doesn't work.” |
_o__)                                             —Eugene P. Gallagher |
Ben Finney




More information about the Python-list mailing list