/* 0 = unknown, 1 = yes, -1 = no. */
static int have_cloexec;
if (have_cloexec >= 0)
{
fd = open (name, flags | O_CLOEXEC);
if (have_cloexec == 0 && (0 <= fd || errno == EINVAL))
/* 0 = unknown, 1 = yes, -1 = no. */
static int have_cloexec;
if (have_cloexec >= 0)
{
fd = open (name, flags | O_CLOEXEC);
if (have_cloexec == 0 && (0 <= fd || errno == EINVAL))