From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a4200cba4e29ac,start X-Google-Attributes: gidfee84,public From: Michael Livingston Subject: Creating a lock file in C Date: 1999/05/05 Message-ID: #1/1 X-Deja-AN: 474564050 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse@bcpl.net X-Trace: news.abs.net 925955769 204.255.212.10 (Wed, 05 May 1999 21:56:09 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Wed, 05 May 1999 21:56:09 EDT Newsgroups: comp.unix.osf.osf1 I'm creating a lock file in C on Digital UNIX 4.0D. I got the statement "open ( filename, O_WRONLY | O_CREAT | O_EXCL, 0644)" from a book on UNIX programming. The book said that UNIX documentation implies that this will work, but does not explicitly state that it well. Does anybody know if this will always allow only one process at a time to successfully create the lock file? We have a multi-CPU system if that has an impact.