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