1 /* 2 * creat.c 3 */ 4 5 #include <sys/types.h> 6 #include <sys/stat.h> 7 #include <fcntl.h> 8 creat(const char * pathname,mode_t mode)9 int creat(const char *pathname, mode_t mode) 10 { 11 return open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); 12 } 13