James Youngman wrote:
+static FILE* fopen_cloexec_for_read_only (const char *file_name) { + int fd = open_cloexec (file_name, O_RDONLY); + return (fd < 0) ? NULL : fdopen (fd, "r"); +}
This should close fd if fdopen fails, no? Also, the indentation should be fixed to be GNU-like.