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


Groups > comp.lang.python > #55926

Re: Reassign or discard Popen().stdout from a server process

From "John O'Hagan" <research@johnohagan.com>
Organization johnohagan.com
Subject Re: Reassign or discard Popen().stdout from a server process
Date 2011-02-10 08:35 +0000
References <mailman.1533.1296549030.6505.python-list@python.org> <mailman.1647.1296834558.6505.python-list@python.org> <pan.2011.02.09.05.24.47.922000@nowhere.com>
Newsgroups comp.lang.python
Message-ID <mailman.72.1297326936.1633.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, 9 Feb 2011, Nobody wrote:
> On Fri, 04 Feb 2011 15:48:55 +0000, John O'Hagan wrote:
> > But I'm still a little curious as to why even unsuccessfully attempting
> > to reassign stdout seems to stop the pipe buffer from filling up.
> 
> It doesn't. If the server continues to run, then it's ignoring/handling
> both SIGPIPE and the EPIPE error. Either that, or another process has the
> read end of the pipe open (so no SIGPIPE/EPIPE), and the server is using
> non-blocking I/O or select() so that it doesn't block writing its
> diagnostic messages.

The server fails with stdout=PIPE if I don't keep reading it, but doesn't fail 
if I do stdout=anything (I've tried files, strings, integers, and None) soon 
after starting the process, without any other changes. How is that consistent 
with either of the above conditions? I'm sure you're right, I just don't 
understand.

Regards,

John

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


Thread

Reassign or discard Popen().stdout from a server process "John O'Hagan" <mail@johnohagan.com> - 2011-02-01 08:30 +0000
  Re: Reassign or discard Popen().stdout from a server process "John O'Hagan" <research@johnohagan.com> - 2011-02-04 15:48 +0000
    Re: Reassign or discard Popen().stdout from a server process "John O'Hagan" <research@johnohagan.com> - 2011-02-10 08:35 +0000
    Re: Reassign or discard Popen().stdout from a server process Nobody <nobody@nowhere.com> - 2011-02-09 05:24 +0000
  Re: Reassign or discard Popen().stdout from a server process Nobody <nobody@nowhere.com> - 2011-02-03 09:48 +0000

csiph-web