Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108312

Re: redirecting stdout and stderr to /dev/null

From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: redirecting stdout and stderr to /dev/null
Date 2016-05-08 11:21 +1000
Message-ID <mailman.486.1462670489.32212.python-list@python.org> (permalink)
References <CAJ2wgcp0HjygmdAw_Q1zJEs=BRWEuDnYRUzQPCcnZEbS0i3uSw@mail.gmail.com> <85r3ddfipl.fsf@benfinney.id.au>

Show all headers | View raw


Jim Dodgen <jim@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: redirecting stdout and stderr to /dev/null Ben Finney <ben+python@benfinney.id.au> - 2016-05-08 11:21 +1000

csiph-web