Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH 0/3] Handle lack of F_DUPFD_CLOEXEC support
@ 2015-06-06  4:19 Guillem Jover
  2015-06-06  4:19 ` [PATCH 1/3] lib/fileutils: Add new dup_fd_cloexec function Guillem Jover
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Guillem Jover @ 2015-06-06  4:19 UTC (permalink / raw)
  To: util-linux; +Cc: Steven Chamberlain

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-08 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-06  4:19 [PATCH 0/3] Handle lack of F_DUPFD_CLOEXEC support Guillem Jover
2015-06-06  4:19 ` [PATCH 1/3] lib/fileutils: Add new dup_fd_cloexec function Guillem Jover
2015-06-06  4:19 ` [PATCH 2/3] lib/sysfs: Use dup_fd_cloexec instead of direct call to fcntl Guillem Jover
2015-06-06  4:19 ` [PATCH 3/3] include/c: Define F_DUPFD_CLOEXEC on kFreeBSD systems if missing Guillem Jover
2015-06-08 10:21 ` [PATCH 0/3] Handle lack of F_DUPFD_CLOEXEC support Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox