openc_trunc.c (226B)
1 /* ISC license. */ 2 3 #include <skalibs/nonposix.h> 4 #include <skalibs/fcntl.h> 5 #include <skalibs/djbunix.h> 6 7 int openc_trunc (char const *fn) 8 { 9 return open3(fn, O_WRONLY | O_NONBLOCK | O_TRUNC | O_CREAT | O_CLOEXEC, 0666) ; 10 }