9vx: make fscreate exclusive, as per 9P - vx32 - Local 9vx git repository for patches. (DIR) Log (DIR) Files (DIR) Refs --- (DIR) commit 31e59616e044a57c3829a225239160a5bd1dcba1 (DIR) parent 2f72652bb94e8b1c9b4fd5fde5be2b38e922886e (HTM) Author: Russ Cox <rsc@swtch.com> Date: Tue, 22 Dec 2009 08:42:27 -0800 9vx: make fscreate exclusive, as per 9P R=rsc http://codereview.appspot.com/180116 Diffstat: src/9vx/devfs-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- (DIR) diff --git a/src/9vx/devfs-posix.c b/src/9vx/devfs-posix.c @@ -480,7 +480,7 @@ fscreate(Chan *c, char *name, int mode, ulong perm) mm = mode & 3; if(mode & OTRUNC) mm |= O_TRUNC; - if((fd = open(path, mm|O_CREAT, 0666)) < 0) + if((fd = open(path, mm|O_CREAT|O_EXCL, 0666)) < 0) oserror(); // Be like Plan 9 file servers: inherit mode bits // and group from parent.