On Fri, 11 Feb 2011, Nobody wrote:
> On Thu, 10 Feb 2011 08:35:24 +, 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
On Thu, 10 Feb 2011 08:35:24 +, 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
On Wed, 9 Feb 2011, Nobody wrote:
> On Fri, 04 Feb 2011 15:48:55 +, 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 ig
On Fri, 04 Feb 2011 15:48:55 +, 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
On Thu, 3 Feb 2011, Nobody wrote:
> On Tue, 01 Feb 2011 08:30:19 +, John O'Hagan wrote:
> > I can't keep reading because that will block - there won't be any more
> > output until I send some input, and I don't want it in any case.
> >
> > To try to fix this I added:
> >
> > proc.stdout = os.
On Tue, 01 Feb 2011 08:30:19 +, John O'Hagan wrote:
> I can't keep reading because that will block - there won't be any more
> output until I send some input, and I don't want it in any case.
>
> To try to fix this I added:
>
> proc.stdout = os.path.devnull
>
> which has the effect of stopp
On Tue, 1 Feb 2011, John O'Hagan wrote:
>
> So far my best bet seems to be closing stdin, which doesn't seem very
> clean, but it does what I want and seems to be just as fast as using
> stdin=open(os.devnull) in the Popen call in the first place.
...and both references to stdin above should hav
On Tue, 1 Feb 2011, Chris Rebert wrote:
> On Tue, Feb 1, 2011 at 12:30 AM, John O'Hagan wrote:
> > I'm starting a server process as a subprocess. Startup is slow and
> > unpredictable (around 3-10 sec), so I'm reading from its stdout until I
> > get a line that tells me it's ready before proceedin
On Tue, Feb 1, 2011 at 12:30 AM, John O'Hagan wrote:
> I'm starting a server process as a subprocess. Startup is slow and
> unpredictable (around 3-10 sec), so I'm reading from its stdout until I get a
> line that tells me it's ready before proceeding, in simplified form:
>
> import subprocess
> p
I'm starting a server process as a subprocess. Startup is slow and
unpredictable (around 3-10 sec), so I'm reading from its stdout until I get a
line that tells me it's ready before proceeding, in simplified form:
import subprocess
proc = subprocess.Popen(['server', 'args'], stdout=subprocess.PI
10 matches
Mail list logo