0

Hi All,

Is it possible to flush the buffer of "popen2.Popen3(cmd)"after some time interval?

I am starting a server forever using the popen2 module. After some time the buffer gets full & it stops logging messages.

As a workaround to this, I am redirecting the output of 'cmd' to a file which solves the buffer problem but creates a new one.

Example: out = popen2.Popen3('./server > /log/log.txt')

Now because of the re direction two processes are started & out.pid returns the process id of the file redirection & I am not able to get the process id of "./server" process.

Any help would be greatly appreciated

Thanks

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by dilbert_here00
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.