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

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

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