Reputation: 7248
In unix, when ProcessA
is reading from FileX
, if ProcessB
attempts to remove the FileX
. Would this cause a deadlock on FileX
?
Wiki says some stuff.. from which I couldnT carve out an answer for this simple question..
Thanks in advance.
Upvotes: 0
Views: 41
Reputation: 272337
No. You can remove a file whilst another process is reading it. There's no locking by default.
e.g.
$ touch a
$ tail -f a
and in another prompt
$ rm a
Upvotes: 1