directory
directory copied to clipboard
copyFile opens the file without setting cloexec
copyFile opens a temporary file without setting the close-on-exec flag. So if another thread execs a process at the same time, the process can inherit an open FD to a temp file. Specifically, in withReplacementFile, it uses OS.openBinaryTempFile.
copyFileWithMetadata and copyFileToHandle had this same problem fixed in commit 0ff4e13f1f51234fe047b4bc1ca60e567afd0c36