Curious situation with unlink() and open()

Kevin Cozens kevin-4dS5u2o1hCn3fQ9qLvQP4Q at public.gmane.org
Mon Apr 30 15:37:49 UTC 2012


On 12-04-30 12:59 AM, William Park wrote:
> unlink(2) takes path[] instead of 'fd'.  How do people deal with the
> following situation?

Um... by not letting yourself get in to that situation as it indicates you 
have either a design or coding error. If two instances need to access a 
common file neither should delete it without notifying the other. On the 
other hand, if one instance may still need the contents of the file the 
other instance should not be making the decision to delete the file.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172      | the mouth-breathers, and that's why we're
                                 | powerful!"
#include <disclaimer/favourite> |             --Chris Hardwick
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list