Skip to content
Snippets Groups Projects
Commit 50a0feab authored by Colin Walters's avatar Colin Walters
Browse files

localalloc: Abort on EBADF from close() by default

systemd does this by default. I think we should treat this as a fatal error
since it can cause really painful-to-debug problems if we don't just get
EBADF but actually close something else's fd due to a race.
parent ea6df95f
Branches
Tags
No related merge requests found
......@@ -204,7 +204,8 @@ glnx_cleanup_close_fdp (int *fdp)
if (fd >= 0)
{
errsv = errno;
(void) close (fd);
if (close (fd) < 0)
g_assert (errno != EBADF);
errno = errsv;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment