#include <errno.h>
#include <fcntl.h>
-#include <systemd/sd-journal.h>
+#include "systemd/sd-journal.h"
#include "util.h"
#include "build.h"
}
if (fd >= 3)
- close_nointr_nofail(fd);
+ safe_close(fd);
fd = -1;
log_error("Failed to execute process: %s", strerror(-r));
finish:
- if (fd >= 0)
- close_nointr_nofail(fd);
-
- if (saved_stderr >= 0)
- close_nointr_nofail(saved_stderr);
+ safe_close(fd);
+ safe_close(saved_stderr);
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}