buffers readlines and general popen2 confusion...

Jim Segrave jes at nl.demon.net
Sat May 20 19:09:21 EDT 2006


In article <1148162219.463249.155680 at j33g2000cwa.googlegroups.com>,
aristotelian at onet.eu <aristotelian at onet.eu> wrote:
>I'm interested in taking the output of a daemonized shell script that
>greps for patterns which would act as an argument to a script. Is it
>better to write this stuff to file and visit the file every few seconds
>or can this be done a better way. I'm hoping for a more elegant
>solution. So far I've seen some troubling info about buffer overflows
>with popen2 but it looks like the low-hanging fruit. I'm not a unixpro
>so I want to make sure anything I tackle is best practice. Suggestions
>welcomed.

I'm puzzled - a daemonised program normally closes stdin/stdout/stderr
and disconnects from its controlling terminal, so where is its output
going? 




-- 
Jim Segrave           (jes at jes-2.demon.nl)




More information about the Python-list mailing list