summaryrefslogtreecommitdiff
path: root/src/libunixonacid/openc_truncat.c
blob: 55d112326f37fec0a319c2430abd03a0bf91fa21 (plain)
1
2
3
4
5
6
7
8
9
/* ISC license. */

#include <skalibs/fcntl.h>
#include <skalibs/unix-transactional.h>

int openc_truncat (int fd, char const *name)
{
  return open3_at(fd, name, O_WRONLY | O_NONBLOCK | O_TRUNC | O_CREAT | O_CLOEXEC, 0666) ;
}