> no, it won't: OEXCL, perhaps, but not DMEXCL. > i'd have thought it should be used in fscreate, though, > to help chan.c implement OEXCL correctly. fscreate should > fail if the file exists, but perhaps that happens another way.
yes, there's a bug. fscreate should or in O_EXCL unconditionally here to implement the correct 9p create semantics: if((fd = open(path, mm|O_CREAT, 0666)) < 0) oserror(); the or'ing in is unconditional because create(5) always fails when the target already exists. the OEXCL in create(2) is a kernel-only flag (not part of 9p), like OCEXEC. russ