Deletion of open named pipes
I am creating and opening a named pipe (using mkfifo() ) and the open is blocked (till someone else opens in write mode). However, another process is easily able to delete the pipe file while the first process is blocked on it. Is this behaviour ok? Shouldn't the file be locked because someone else is blocked on it?
Please note that the named pipe was created with permissions 0400. This means only the owner would have the right to modify/delete it, right? The process that deleted it had a different UID and GID. So its not making sense to me how a "rogue" process can just come and delete a file being used by someone else without even having modify permissions on it.
The only thing I can think of is that the directory permissions are 0777 and that is why he can delete it. Still, the behaviour sounds a little wierd that a busy system file is not locked against deletion.