if (child_pid < 0) {
r = -errno;
log_error("Failed to fork: %m");
- close_pipe(fd);
+ safe_close_pair(fd);
return r;
}
_exit(EXIT_FAILURE);
}
- r = close_pipe(fd);
- if (r < 0)
- log_warning("Failed to close pipe fds: %m");
+ safe_close_pair(fd);
/* Make sure the child goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)
static int spawn_getter(char *getter, char *url) {
int r;
- char _cleanup_strv_free_ **words = NULL, **words2 = NULL;
+ char _cleanup_strv_free_ **words = NULL;
assert(getter);
words = strv_split_quoted(getter);