summaryrefslogtreecommitdiff
path: root/src/libstddjb/open_trunccoe.c
blob: 3be3df65ff856252cd17812d350d461ed5a483a6 (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 open_trunccoe (char const *fn)
{
  return open3(fn, O_WRONLY | O_NONBLOCK | O_TRUNC | O_CREAT | O_CLOEXEC, 0666) ;
}