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

#include <sys/types.h>
#include <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) ;
}