From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2729 invoked from network); 6 Mar 2023 19:35:56 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Mar 2023 19:35:56 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678131356; b=dNCNdbjtAGJ5BOHWfd+F4T29FjD/N+VazrlztQRbHsAZQpqzkQ5hq6yRDanX27w5sxk0a0VVcF fOx8wf6QxsEx35yu7l9Y2Ex2/bxslocE4CbTeoEEPwaRfLIACFxB8PoywQku2onDQAzSmEU0Y+ EyGWNVDdHuJL7Ox5728cNYA+gIIcbs8BMu2yxkZ0O6wkwTV4sz6MtHkmevrYEm3F7gOysHWfMt heHWaKeMVVUIhmoHT5vRUUbi1GNK4l6zMiLi1S7k5Ke7fsYigXLZazcsYyW2haf57g/jhqIM5b c8Q/CP1Sbno36h2c2BnFb7/Oh0wiqQF7OIxl9mHAhLp4xA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1678131356; bh=lpA7KlsLTTFYsjYLpBQlAy3ZfmU66eM7fiLnQTDVa24=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=HWbGk5b587SvUrVBHDaUkr3pC8qBDRXkF+PMpDoG/USHsG8c04SiHrthTYbVBWg1Ggi2quXrK1 zQ/PcJI97RFqJ62miBCrGEhAOB6jsaT5o7Rxgj0W0xty/Wz5d3jzHTEApzcHDSquoDZ1rJ9uU6 /GVvVDAkNrT+qNyI8TRGqg/PXLgx6k5RQX/v/xmbMQE4M6ubOJdGU5VTrIt382P+9HpB3R03+s rPjZjo2WTe84eCDHK1+cNtOQljYf54AtrYT7cb/SxmMkd+1bte4i51pvUc0CtunXNYNQ2rEhzy Qfhgn2uUsf2bTAnqu52xgkumkp4LIbN6m9Y3chFSz5aEyA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=lpA7KlsLTTFYsjYLpBQlAy3ZfmU66eM7fiLnQTDVa24=; b=W+7aQLFOXkzpdWUBOulmCtSb33 /EhHQoEIGOf6gJPe6Y77FuUr0GU/+Lqg/G4s6Qls6lGys6Cr1icWqmVkiMUDj8/L45nWSAon0TOvF pbSR5Gt5GHtdpddNu6l+GDTQq2wI9WkiMmxkHn7c//v8LnjuRwfuCav10b73rAnjkUC6ag7MtaRGa pMLMPDu6RsxOfW4v5ykdTjYnHSg9BjIuV9T768sL1KbtkN7gxsbMid3Lxv8e0esYLRmnqtUGA91O0 PDVnKMdZwPxKHUVbalIhOLaMFMl5WBX1magmlB/M4Tj/2IGDuIhOvBn2LYiEYcYsf12dKmUbK6MnJ NuHBm0dA==; Received: by zero.zsh.org with local id 1pZGcl-000LVY-Hd; Mon, 06 Mar 2023 19:35:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f46.google.com ([209.85.208.46]:45702) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pZGcV-000LDQ-95; Mon, 06 Mar 2023 19:35:40 +0000 Received: by mail-ed1-f46.google.com with SMTP id cy23so43153831edb.12 for ; Mon, 06 Mar 2023 11:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; t=1678131338; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lpA7KlsLTTFYsjYLpBQlAy3ZfmU66eM7fiLnQTDVa24=; b=C1vjansua+OFudei2sfoW/U8tLXTlIb9P6Nf53Fw2h5Wquywgi/pVXlQrSKT/oowgF JoLytN2ZYFsoVj9UP4dx29XwfXu8bu7p8QlUL3tf2ZsdhzeO/2bXIzAz5G8q3XwKWBKV G6Qo5bNW7+3c9uIpB0X4xvtrrRkWBntEYO3U1q/XA6ItdRnPWLy+e6iPlPA0/vniFr/3 FPr/Q01w3PUy5XzqdIqa/Rg6BRkZ2Z6aSsNHM+Ah6ejKdNoDZzb3PKukj0e58WhaPiAy uearvZEeMzY71T9AndKwiirLsX41ytS/chAmVdvA4HBIY9fHnyjfd+ocreATi7oOk35T nFPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678131338; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lpA7KlsLTTFYsjYLpBQlAy3ZfmU66eM7fiLnQTDVa24=; b=7Z1yvkyaHPTuxWbCYjvGaebc2SDUVTJcvYGGzeNFbzc56lX1zqe8u51Zh4k9f9p5PQ WFajI4w8XC/pMeNrb9ru9G7zDUr/TQi9FK+lijsEd2L/dzSbfzuIxMg8SBrLe4xg8hA9 69CJI0DDMmoLf0APdAJ6a81Qk9wI3tXdwYb3xhEMLoWjj4MKKN70fab0IGglu+u2I/Vv IQU+wfW/2WZDrdWajmjd3Hs6uL4ep6c6PhLX5H58VI7LL+liN5OuhS6iXzraV4RJCSnt QrM6AkUUhPAvtbMumbCcl8dIEm3FolXR1ThSYEiEj20PHhushSAUKyVtlhaTP78OraRP xeww== X-Gm-Message-State: AO0yUKVasfGYb1+i9yhLg99kG6nBu1LBezm4dk5ZnJtTzTeY4B8xQ8bX YB8XI0oZmDw+EqVYj/48BMXtXHKaXplGYruAOqoGvQ== X-Google-Smtp-Source: AK7set/uI8hNj/26CArvlR23fqWy9qH2JTCh5qhWgfy1byy65+4xNwAf44VF1lXedajAidMvjsMzaLH6MkRmkSRsP+o= X-Received: by 2002:a50:d581:0:b0:4bc:136a:e25 with SMTP id v1-20020a50d581000000b004bc136a0e25mr6522105edi.3.1678131338280; Mon, 06 Mar 2023 11:35:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 6 Mar 2023 11:35:07 -0800 Message-ID: Subject: Re: Weird bug / missing feature with gvim interaction To: Felipe Contreras Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51520 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Mon, Mar 6, 2023 at 6:31=E2=80=AFAM Felipe Contreras wrote: > > On Sun, Mar 5, 2023 at 10:28=E2=80=AFPM Bart Schaefer wrote: > > > > What's not clear is where the HUP is coming from > > > > Puzzlingly, using "nohup xdg-open ..." doesn't help. > > That doesn't help, but "setsid nohup xdg-open ..." does help, both in > bash and zsh. But I believe that's what the vim code essentially tried > to do. Sure, but vim is doing it before zsh starts up, whereas when you use the setsid command it creates the new process group after zsh runs it. E.g., without the setsid command, I believe the thread would be that zsh execs nohup which execs xdg-open, all with no forking involved, but if you add setsid in front then zsh execs setsid which forks before exec of nohup. Zsh doesn't use setsid(2) and doesn't mess with the process group by any other means unless there's a controlling tty to attach to, which there presumably is not in this case. Still doesn't explain the source of the HUP signal, or why nohup fails to ignore it ... unless xdg-open is deliberately unblocking it again.