Antonio Beamud Montero wrote:
> El jue, 02-10-2008 a las 10:56 -0400, Chris McDonough escribió:
>> Antonio Beamud Montero wrote: 
>>> Can I force the flush of the output buffers in any way?
>> You might be able to run the process in "unbuffered" mode.  The mechanism to 
>> do
>> this is different for each subprocess, but if e.g. your subprocess was a 
>> Python
>> program, you might do:
>>
>> python -u mysubprocess.py
> 
> Ok, works fine.
> I was using:
> 
> sys.stdout.write(line)
> 
> And I thought that was sufficient, but I was wrong...
> 
> I've changed the first line to:
> 
> #!/usr/bin/python -u
> 
> A lot of thanks, Chris.
> 
> 

FWIW, you could also probably do this every place you write to stdout rather
than using unbuffered mode:

sys.stdout.write(line)
sys.stdout.flush()

- C
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to