Message ID | 20230419160207.65988-1-bugaevc@gmail.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 162783870885 for <patchwork@sourceware.org>; Wed, 19 Apr 2023 16:03:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 162783870885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681920222; bh=G6dJ3U+ZwHhd0SExUHzBufZyDb58CwQNvs2P7Sw4oes=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=eqdCHeqjXgtZmDLA/v3KE+dYvC1HibEG5VRyg/Ia1E9msIojXeoExZ9BGXsbwC32x m2j7xkWyiEVwML1UsvKDa4dyJAQxnGMwTkxGK+PDs/Qti7k+IV1QrvFbQ708EugXMY uz613o+Qgmb3H76vGvMIxVdkV9+Qetz2CxquKiw0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id C5A673858D33 for <libc-alpha@sourceware.org>; Wed, 19 Apr 2023 16:02:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5A673858D33 Received: by mail-lj1-x231.google.com with SMTP id r9so21091461ljp.9 for <libc-alpha@sourceware.org>; Wed, 19 Apr 2023 09:02:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681920148; x=1684512148; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=G6dJ3U+ZwHhd0SExUHzBufZyDb58CwQNvs2P7Sw4oes=; b=VUVYltR6HOfkSjdKKz77S/MkIikZOxd4BmIjVFGQ3BuG+NPoNbvIN2ye6V3BgXQSux NsT9A5j2lsI/UR1feeVY3gU8hsKh0YE5XGYibrRHb3dauUw6LRlQFZt+nLEOKjtk92A+ Itj731Q8YVN/0NaeFs4DuM46zOl4F0utMOfoege63A2vG3NNx6EGWlU+QUrptwadxoZ4 XPWk/CACgM9PxBQ+7sKXHUE0Nn8aykcX3y8KWUuFeWfNPECBLlMIYkmj1JBlKMILGaRh zNUQqohwx8ejfvgfUF6SEMBTsWP/5yhtOCQFdvF2AZP8L9sBfa/T+Rot2uMJZcSr//kT Bz1g== X-Gm-Message-State: AAQBX9c4i/lkjfznMUyMfLWKD3fFF+zhHNnNrj3U5OJTF2ymz236d+QR KiVdWqY0d19pKh419Ipkr5XQUrUvR28= X-Google-Smtp-Source: AKy350YcRoufsNewiZS7885j/Hn8VmCdKHWxhQjVNeF1q2ii7J7MfGqMn9Ll0XQ50Ir7zY61YMebrg== X-Received: by 2002:a2e:8011:0:b0:2a7:73a2:d915 with SMTP id j17-20020a2e8011000000b002a773a2d915mr2103978ljg.5.1681920147728; Wed, 19 Apr 2023 09:02:27 -0700 (PDT) Received: from surface-pro-6.. ([194.190.106.50]) by smtp.gmail.com with ESMTPSA id l1-20020a2e7001000000b002a6007383a0sm2959663ljc.135.2023.04.19.09.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Apr 2023 09:02:26 -0700 (PDT) To: libc-alpha@sourceware.org Cc: bug-hurd@gnu.org, Samuel Thibault <samuel.thibault@gnu.org>, Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>, =?utf-8?q?Cristia?= =?utf-8?q?n_Rodr=C3=ADguez?= <crrodriguez@opensuse.org>, Sergey Bugaev <bugaevc@gmail.com> Subject: [RFC PATCH v2 0/7] O_IGNORE_CTTY everywhere & misc fixes Date: Wed, 19 Apr 2023 19:02:00 +0300 Message-Id: <20230419160207.65988-1-bugaevc@gmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Sergey Bugaev <bugaevc@gmail.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
O_IGNORE_CTTY everywhere & misc fixes
|
|
Message
Sergey Bugaev
April 19, 2023, 4:02 p.m. UTC
Changes since v1: * Addressed nits * Made improvements to daemon () as discussed * Fixed std{in,out,err} mode in csu/check_fds.c * Tweaked the comment on O_IGNORE_CTTY But also, I found out that opening some internal files (specifically I have noticed this about nsswitch.conf) still triggers the term_getctty () RPC -- and that's because they're opened with fopen (), not plain open (). Is there anything we can do abiut this? I suppose there's no way we're could introduce a new fopen () mode character just for this? Even with the fopen-using callsites left out, not making ctty RPCs in all the other cases is still a solid improvement. Sergey Sergey Bugaev (7): misc: Convert daemon () to GNU coding style misc: Ignore SIGHUP in daemon () while forking Use O_CLOEXEC in more places (BZ #15722) csu: Fix standard fds' mode hurd: Make dl-sysdep's open () cope with O_IGNORE_CTTY include/fcntl.h: Define O_IGNORE_CTTY Use O_IGNORE_CTTY where appropriate catgets/open_catalog.c | 4 +- csu/check_fds.c | 6 +- elf/dl-load.c | 2 +- elf/dl-misc.c | 2 +- elf/dl-profile.c | 3 +- gmon/gmon.c | 7 ++- 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 | 103 +++++++++++++++++++++------------- nss/nss_db/db-open.c | 3 +- rt/shm_open.c | 2 +- shadow/lckpwdf.c | 2 +- sysdeps/mach/hurd/dl-sysdep.c | 4 +- sysdeps/mach/hurd/opendir.c | 2 +- sysdeps/pthread/sem_open.c | 9 ++- sysdeps/unix/bsd/getpt.c | 4 +- 20 files changed, 120 insertions(+), 71 deletions(-)