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

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