[PATCH 0/3] Handle lack of F_DUPFD_CLOEXEC support

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

 



Hi!

These patches make the code gracefully handle missing F_DUPFD_CLOEXEC
support at build and run-time. This affects at least current GNU/kFreeBSD
systems. I've included the last patch so that GNU/kFreeBSD systems can
immediately benefit from F_DUPFD_CLOEXEC before glibc is updated there,
but if you prefer to omit that one out of disgust, that would be fine I
guess.

While the actual problem is that sysfs code is being built and used on
non-Linux systems, it is too entrenched to get rid of it w/o substantial
amounts of work. Also GNU/kFreeBSD does have limited sysfs support via
the compat linsysfs, so it might not be entirely useless there. But it
certainly is not useful on GNU/Hurd though, at least not currently.

The patches were tested by Steven Chamberlain.

Thanks,
Guillem

Guillem Jover (3):
  lib/fileutils: Add new dup_fd_cloexec function
  lib/sysfs: Use dup_fd_cloexec instead of direct call to fcntl
  include/c: Define F_DUPFD_CLOEXEC on kFreeBSD systems if missing

 include/c.h         |  6 ++++++
 include/fileutils.h |  1 +
 lib/fileutils.c     | 30 ++++++++++++++++++++++++++++++
 lib/sysfs.c         |  2 +-
 4 files changed, 38 insertions(+), 1 deletion(-)

-- 
2.2.1.209.g41e5f3a

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux