Changes between Initial Version and Version 9 of Ticket #10004


Ignore:
Timestamp:
10/01/10 01:48:28 (3 years ago)
Author:
SimonKing
Comment:

Replying to mpatel:

... work in Expect.quit? Then you could simplify the try block in Expect._local_tmpfile. It seems there's a tradeoff.

That was my question: Is there a tradeoff? So, now that you taught me how to deal with the double underscore attribute, I'll try to change my patch accordingly.

Could you explain where Expect.quit is called (indirectly) in your example in the description?

OK, done. quit is called in @parallel, because that decorator needs to wipe all interfaces -- but it was not rigorous enough, as it did not unset the name of the temporary file.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10004

    • Property Status changed from new to needs_review
    • Property Milestone changed from sage-4.6.1 to sage-4.6
    • Property Authors changed from to Simon King
  • Ticket #10004 – Description

    initial v9  
    2121}}} 
    2222 
     23The reason for this behaviour lies in the {{{quit()}}} method of Expect interfaces: If {{{_local_tmpfile()}}} is called then the resulting name is stored in {{{__local_tmpfile}}}. The {{{@parallel}}} decorator needs the interfaces in a clean state, so, it calls {{{quit()}}}. However, quit does not unset {{{__local_tmpfile}}}, and thus all interface instances in the different branches of the parallel computation will use the same previously stored file name. 
     24 
    2325The consequences are obvious: Having different processes use the same file for passing command lines must end in a disaster. 
    2426