This commit is contained in:
Connor Lane Smith
2011-05-28 15:37:42 +01:00
parent 0a3a8c55e4
commit 3172b979dc
5 changed files with 48 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ touch(const char *str)
eprintf("stat %s:", str);
if(cflag)
return;
if((fd = creat(str, O_RDONLY|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
if((fd = creat(str, O_EXCL|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0)
eprintf("creat %s:", str);
close(fd);
}