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
This commit is contained in:
Dan Nicholson 2016-08-09 11:46:30 -07:00 committed by Atomic Bot
parent 1e5ff71c49
commit c3c07a2d49
1 changed files with 1 additions and 1 deletions

View File

@ -1362,7 +1362,7 @@ ostree_repo_static_delta_generate (OstreeRepo *self,
} }
else 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) if (tmp_dfd < 0)
{ {
glnx_set_error_from_errno (error); glnx_set_error_from_errno (error);