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