There were two copies trigger!
The one in ZEO/trigger.py was the good code, but we want it to live in ZEO/zrpc/trigger.py. This checkin makes that change. The key checkin of ZEO/trigger.py had this checkin comment: Fix trigger close/__del__. The close() mechanism for an asyncore file_dispatcher is not safe to call multiple times. It's calling os.close() on a file descriptor (int). Guido observed that if you call close() twice, you could be in trouble: 1) First close() call closes FD 6. 2) Another bit of code opens a new file, getting FD 6. 3) Second close() call closes FD 6. Waah! FD 6 is some other file. The workaround attempt here is to define a close() method on a trigger that only closes the file descriptors the first time. Also, make sure that both file descriptors are closed. The previous version only closed the read-end of the pipe.
Showing
src/ZEO/trigger.py
deleted
100644 → 0
Please register or sign in to comment