mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-25 20:25:27 +00:00
coverity: Check fcntl return value
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
acd4922efe
commit
71b2940d87
@ -1026,8 +1026,11 @@ static int attach_child_main(void* data)
|
|||||||
flags = fcntl(fd, F_GETFL);
|
flags = fcntl(fd, F_GETFL);
|
||||||
if (flags < 0)
|
if (flags < 0)
|
||||||
continue;
|
continue;
|
||||||
if (flags & FD_CLOEXEC)
|
if (flags & FD_CLOEXEC) {
|
||||||
fcntl(fd, F_SETFL, flags & ~FD_CLOEXEC);
|
if (fcntl(fd, F_SETFL, flags & ~FD_CLOEXEC) < 0) {
|
||||||
|
SYSERROR("Unable to clear CLOEXEC from fd");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're done, so we can now do whatever the user intended us to do */
|
/* we're done, so we can now do whatever the user intended us to do */
|
||||||
|
Loading…
Reference in New Issue
Block a user