| ▲ | ButlerianJihad 6 hours ago | |
I can testify that it's bonkers when a shell script is overwritten in place, and the interpreter bombs out with an irreproducible error message, because the contents shifted around that much. Or I suppose it would be even worse if the script silently continued to execute after that same trauma. Also, let's not limit our scenarios to one process and one file descriptor. Each of those is a reference count. So your process may open the same file 3 times. And/or 10 processes on the system may hold the file open. 30 file descriptors might as well be 30 hardlinks in the filesystem. The file has life until all of those references go away. | ||