about summary refs log tree commit diff
path: root/src/libunixonacid/open_truncat.c
blob: ce4f1327c61b4e54afb93d318431eb8470d31756 (plain) (blame)
1
2
3
4
5
6
7
8
9
/* ISC license. */

#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) ;
}