summaryrefslogtreecommitdiff
path: root/src/libstddjb/openc_excl.c
blob: 9a45913eec3a8b3fa7d9aea222c34a413af02e48 (plain)
1
2
3
4
5
6
7
8
9
10
/* ISC license. */

#include <skalibs/nonposix.h>
#include <fcntl.h>
#include <skalibs/djbunix.h>

int openc_excl (char const *fn)
{
  return open3(fn, O_WRONLY | O_CREAT | O_EXCL | O_NONBLOCK | O_CLOEXEC, 0666) ;
}