You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q: When does a with context never exit?
A: When the command in the context invokes execv.
It occurred to me today that using execve to launch the child process would eliminate the cleanup logic for the temporary directory.
I started to try to think of some clever way to cause the cleanup logic to be invoked after the child process has exited:
somehow inject an atexit behavior into the child Python process.
run a separate subprocess that monitors the parent and cleans up when the parent exits.
invent an OS-level process-temporary store, a part of the file system that the OS will guarantee will be cleaned up when the process exits. How cool would that be? I'm surprised such a thing doesn't already exist.
Then I realized, I'm trying too hard and I should probably just switch rwt back to the old subprocess behavior.
The text was updated successfully, but these errors were encountered:
Q: When does a
with
context never exit?A: When the command in the context invokes execv.
It occurred to me today that using
execve
to launch the child process would eliminate the cleanup logic for the temporary directory.I started to try to think of some clever way to cause the cleanup logic to be invoked after the child process has exited:
Then I realized, I'm trying too hard and I should probably just switch rwt back to the old subprocess behavior.
The text was updated successfully, but these errors were encountered: