replace more dup() by F_DUPFD_CLOEXEC

This commit is contained in:
Lennart Poettering 2014-05-13 16:40:53 +02:00
parent 85c08dc013
commit ead349509e
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ static int inhibit(sd_bus *bus, sd_bus_error *error) {
if (r < 0)
return r;
r = dup(fd);
r = fcntl(fd, F_DUPFD_CLOEXEC, 3);
if (r < 0)
return -errno;

View file

@ -332,7 +332,7 @@ static int remove_marked_symlinks(
int q, cfd;
deleted = false;
cfd = dup(fd);
cfd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
if (cfd < 0) {
r = -errno;
break;