You don't always want to kill the process; many processes could handle a file being closed without having to terminate, and would want to if it was multithreaded, with one thread using that file (eg, disconnecting a file from a browser, you wouldn't want to lose all browser windows).
It could also be the kernel that has the file open (eg, mounted into the filesystem using loopback block device); killing the kernel to release the file isn't desirable =)
I think if you're detaching files, a signal should be sent to processes at the same time, so they know the file is closed before they try and fail a read/write.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds