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

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

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