From: Dan Nicholson Date: Tue, 9 Aug 2016 18:46:30 +0000 (-0700) Subject: deltas: Use F_DUPFD_CLOEXEC properly X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~48^2~31 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c3c07a2d496f43cdda0a8f5617c6373d961f67df;p=ostree.git deltas: Use F_DUPFD_CLOEXEC properly You need to supply an argument to F_DUPFD_CLOEXEC or fcntl will return EINVAL. Use 3 as the minimum fd number as is standard. Closes: #454 Closes: #448 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index 7ef7680d..188f467d 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -1362,7 +1362,7 @@ ostree_repo_static_delta_generate (OstreeRepo *self, } else { - tmp_dfd = fcntl (self->tmp_dir_fd, F_DUPFD_CLOEXEC); + tmp_dfd = fcntl (self->tmp_dir_fd, F_DUPFD_CLOEXEC, 3); if (tmp_dfd < 0) { glnx_set_error_from_errno (error);