bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fd_is_cloexec () does not work on Fedora buildhosts


From: Kamil Dudka
Subject: fd_is_cloexec () does not work on Fedora buildhosts
Date: Sat, 3 Apr 2010 23:45:20 +0200
User-agent: KMail/1.9.10

Hello,

thanks for the new release of findutils in the first place!

While I was trying to build packages for Fedora, I ran into huge test-suite 
failure.  For merely all tests the assertion within complain_about_leaky_fds 
() failed on the descriptor 3 or 4.

Poking around, I discovered the function fd_is_cloexec () does not work
there.  As it seems to be kernel specific, I haven't been able to reproduce
it locally.

Here is a minimal example:

int main()
{
  const int fd = open(".", O_RDONLY|O_CLOEXEC);
  if (-1 == fd)
    return EXIT_FAILURE;

  const int flags = fcntl(fd, F_GETFD);
  printf("fcntl(%d, F_GETFD) = 0x%x\n", fd, flags);
  return EXIT_SUCCESS;
}

The call of fnctl () returns 0x0 on the buildhost.

I was able to get over the failure using the attached patch.

Kamil

Attachment: findutils-4.5.7-fdleak.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]