Welcome to little lamb

Code » limb » release » tree

[release] / src / liblimb / djbunix.h / openc_exclat.c

/* This file is part of limb                           https://lila.oss/limb
 * Copyright (C) 2023 Olivier Brunel                          jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <fcntl.h>
#include <limb/djbunix.h>

int
openc_exclat(int fd, const char *file)
{
    return open3_at(fd, file, O_WRONLY | O_CREAT | O_EXCL | O_NONBLOCK | O_CLOEXEC, 0666);
}