Search code examples
solaris

What happens to an open file handle on Solaris if the pointed file gets moved or deleted?


What happens to an open file handle on Solaris if the pointed file gets moved, delete

As per What happens to an open file handle on Linux if the pointed file gets moved, delete

Linux allows renaming files while there are Open FDs and opened FDs work fine.

Does the same apply to other cases ? e.g. Solaris

Linux => Yes

Windows => No

Solaris ?


Solution

  • Yes. Linux emulates the Unix/Solaris behavior of the file remaining allocated and the file contents being available until it is closed by all processes that have it open. In other words, Linux/Solaris/UNIX all behave the same.