ccl
ccl copied to clipboard
WIP Add :directory parameter to ccl:run-program
Will this function work with multiple threads without race conditions? We are accessing CWD, which is a process-global singular resource, so multiple threads which launch programs simultaneously may collide with each other on attempting to set this.
Will this function work with multiple threads without race conditions?
The directory is changed in the child process after fork (right before executing the external program), and I'm pretty sure the issues you mention are not relevant. Am I missing something?
OK - if we have already forked, then we are mutating the new process's CWD, and so the old process's CWD is untouched. Thanks for clarification.
One thing I'm wondering is whether the external command should be executed if chdir fails? I think not, so more work needs to be done here.
Imagine the command is “rm”. Directory context is very important.
On Aug 13, 2020, at 05:11, Jānis Džeriņš [email protected] wrote:
One thing I'm wondering is whether the external command should be executed if chdir fails? I think not, so more work needs to be done here.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
My (not very original) plan is to create a pipe and communicate any failures to parent process through that.