From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 9 Feb 1998 10:42:59 -0600 From: G. David Butler gdb@dbSystems.com Subject: [9fans] create(2)/open(2) race for file creation Topicbox-Message-UUID: 723b8024-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19980209164259.zru_u4Xn4nTA8v9h0yl4xUVjkicSvKaMWev9LrmudZo@z> I have seen serveral suggestions that I use a process somewhere to control the create race. I am trying to do just that. The process already exists! It is in the 9P fileserver and the IPC used to reach it is the Tcreate message. What I'm trying to do is determine the best way to get to it from a system call. The current create(2) call, IMHO, is broken. When the call was implemented, it introduced a race condition that was not necessary and can't be easily avoided. Since Plan9 is a "research" system, I don't consider the API set in stone and was trying to open a discussion on the subject. I offered two solutions, an option to open (POSIX O_EXCL) or a fix to create(2). There is a third option that someone hinted at, implement a new system call which provides access to the primitive create(5). Since many of you see the problem with race well enough to suggest the other process solution, perhaps we can focus on trying to eliminate the problem instead of coding our way around it. David Butler gdb@dbSystems.com