[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [rhel5-branch] Make execWithRedirect() append to the files. (#702024)



On 08/29/2011 08:50 PM, Brian C. Lane wrote:
Is this any safer? Seems like Popen is still going to have the same file
open twice. In RHEL6 we seem to be using pipes and tee to manage the
output streams from the process.

Yes, but I wouldn't like to fix this particular bug at the cost of merging all of that.

I think in fact both of the ways are 'safe': it is just the operating system doesn't advance the seek position of each of the (underlying) descriptors (which are indeed used by subprocess.py by calling .fileno() on the file object) in the old version, but it does that in the second, just as described by man 2 open, section O_APPEND.

Does that convince you? We might see a bug or two about this in the future but it is already broken at the moment.

Ales


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]