A persistent variation of the ql_file class, which silently drops attempts to close its udnerlying file. This is useful when using host environment resources, which should not be closed when their wrapping ql_file gets closed. For example, stdout and stderr might be closed by the em
| 95 | |
| 96 | |
| 97 | class PersistentQlFile(ql_file): |
| 98 | """A persistent variation of the ql_file class, which silently drops |
| 99 | attempts to close its udnerlying file. This is useful when using host |
| 100 | environment resources, which should not be closed when their wrapping |
| 101 | ql_file gets closed. |
| 102 | |
| 103 | For example, stdout and stderr might be closed by the emulated program |
| 104 | by calling POSIX dup2 or dup3 system calls, and then replaced by another |
| 105 | file or socket. this class prevents the emulated program from closing |
| 106 | shared resources on the hosting system. |
| 107 | """ |
| 108 | |
| 109 | def close(self): |
| 110 | pass |