4 ms·
> since it could break another process. This isn't how things work on Linux. It keeps the file "alive" as long as there is at least one process using it. Any p
by programmer_dude 4y ago
> since it could break another process.
This isn't how things work on Linux. It keeps the file "alive" as long as there is at least one process using it. Any processes which do not have the file open already will not be able to see it but those that do can keep using it. The file will be deleted when all processes release the file.
- lizknope 4y agoI remember getting the "text file busy" message on various Unix systems in the 1990's https://stackoverflow.com/questions/16764946/what-generates-the-text-file-busy-message-in-unix https://stackoverflow.com/questions/16764946/what-generates-...
- mort96 4y agoThat's about modifying files though, not deleting files. If you delete an executable that's currently running and create a new one with the same path, that's fine. If you try to modify an executable that's currently running, the kernel won't let you.
- yencabulator 4y agoNot normally on delete. (Most common exception: you're trying to delete an active mountpoint.) Where most people see that is attempting to mutate a currently running executable. That's forbidden, as it would lead to executing essentially random code. You can replace what file the filename points to, with rename.