[v3,0/2] O_IGNORE_CTTY everywhere

Message ID 20230604204258.2026816-1-bugaevc@gmail.com
Headers
Series O_IGNORE_CTTY everywhere |

Message

Sergey Bugaev June 4, 2023, 8:42 p.m. UTC
  Hello,

this is the v3 of the "O_IGNORE_CTTY everywhere" patchset. Please see
the v1 cover letter [0] for an explanation of what O_IGNORE_CTTY is and
does.

[0]: https://sourceware.org/pipermail/libc-alpha/2023-April/147355.html

Changes since v2:

1. Dropped the already commited patches.

2. Dropped the unrelated changes to daemon and csu/check_fds.c, since
there doesn't seem to be a clear consensus on what we want there. I
don't really care that much about those changes, and I don't think they
should stall/block the actual O_IGNORE_CTTY patches. Plus, the Hurd has
its own version of check_fds.c anyway, which already does the right
thing wrt cttys.

With this, the patchset is quite small and manageable again.

I'm still interested in whether there could be a way to pass
O_IGNORE_CTTY when using fopen () too -- but that doesn't have to block
this patchset either.

Sergey

Sergey Bugaev (2):
  include/fcntl.h: Define O_IGNORE_CTTY
  Use O_IGNORE_CTTY where appropriate

 catgets/open_catalog.c      |  4 ++--
 elf/dl-load.c               |  2 +-
 elf/dl-misc.c               |  2 +-
 elf/dl-profile.c            |  2 +-
 gmon/gmon.c                 |  4 ++--
 iconv/gconv_cache.c         |  3 ++-
 include/fcntl.h             | 15 +++++++++++++++
 locale/loadarchive.c        |  7 ++++---
 locale/loadlocale.c         |  4 ++--
 login/openpty.c             |  2 +-
 login/utmp_file.c           |  7 ++++---
 misc/daemon.c               |  2 +-
 nss/nss_db/db-open.c        |  3 ++-
 rt/shm_open.c               |  2 +-
 shadow/lckpwdf.c            |  2 +-
 sysdeps/mach/hurd/opendir.c |  2 +-
 sysdeps/pthread/sem_open.c  |  4 ++--
 sysdeps/unix/bsd/getpt.c    |  4 ++--
 18 files changed, 45 insertions(+), 26 deletions(-)