mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 06:03:51 +00:00
replace more dup() by F_DUPFD_CLOEXEC
(cherry picked from commit ead349509e)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
67eb48925c
commit
03513a460e
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user