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

Path csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <johnmohagan@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'attempting': 0.04; 'received:localnet': 0.05; 'wed,': 0.05; 'none)': 0.07; 'run,': 0.07; 'subject:process': 0.07; 'i/o': 0.09; 'non-blocking': 0.09; 'wrote:': 0.14; "doesn't.": 0.16; 'stdout': 0.16; 'subject:discard': 0.16; 'subject:server': 0.16; 'feb': 0.16; 'seems': 0.17; 'nobody': 0.21; 'tried': 0.22; 'sender:addr:gmail.com': 0.22; 'buffer': 0.23; 'changes.': 0.23; 'fails': 0.23; 'header:In-Reply-To:1': 0.23; 'right,': 0.24; 'fail': 0.28; 'files,': 0.28; 'messages.': 0.28; 'process,': 0.28; "i'm": 0.28; 'curious': 0.28; '(so': 0.30; 'strings,': 0.30; 'server': 0.30; 'to:addr:python-list': 0.31; 'starting': 0.31; 'fri,': 0.31; "doesn't": 0.32; 'up.': 0.33; 'header:User-Agent:1': 0.34; 'error.': 0.35; 'another': 0.35; 'using': 0.35; 'but': 0.36; 'open': 0.36; 'consistent': 0.36; 'received:209.85': 0.38; 'either': 0.38; 'received:google.com': 0.38; 'end': 0.38; 'that,': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; "it's": 0.40; 'header:Message-Id:1': 0.61; 'soon': 0.75; "(i've": 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:organization:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=7JgHO/oaDCkL7zcjlHnUdTOrd+VmZgo9FCbKICbFI+Q=; b=f1PQesyW+r9Wm8UWtNPrJfh/Ri9fGHGKbfn693jP+Iqyb+B04mRqocw7l7AvWJaNbY VKu84UmEHkzWPvdzuGq1QTKCrLXI6IgmD7dLot3rW+4gEKQ22yybTyCMroVdBrkcSsiy a4wtrceT+hwbctjZ0pbnLZZqP0RYafe2P5hg4=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:organization:to:subject:date:user-agent:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=BcK91SOAY739w9l8oUylD/W6oZU/z6ZA8hfCQATP/POigGb8GvQ7jJuGDYVQL7aNVi cuhr+pg9/e0hgp+y1IjaRI8zYckwBrtt/1q0ALA7NTbdmkNPH2UNT5Aud4bTqSiAifm4 uI7x/3nGYqAweD8RG+Xjmc1tbXWpIrxR7ZXzw=
Sender "John O'Hagan" <johnmohagan@gmail.com>
From "John O'Hagan" <research@johnohagan.com>
Organization johnohagan.com
To python-list@python.org
Subject Re: Reassign or discard Popen().stdout from a server process
Date Thu, 10 Feb 2011 08:35:24 +0000
User-Agent KMail/1.13.5 (Linux/2.6.32-2011-01-16-16.13; KDE/4.4.5; i686; ; )
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>
In-Reply-To <pan.2011.02.09.05.24.47.922000@nowhere.com>
MIME-Version 1.0
Content-Type Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.72.1297326936.1633.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 82.94.164.166
X-Trace 1297326937 news.xs4all.nl 34849 [::ffff:82.94.164.166]:53572
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55926

Show key headers only | 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