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 23063 invoked from network); 6 Mar 2023 04:29:09 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Mar 2023 04:29:09 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1678076950; b=ph8WQdbkzYqCpiFcUx0ZS2sOSpl3QzBDjzVtXe29oe/MENMtc6Iw9yIxSDtKlW80e9b9dd5D4g BjlR6B4EsFhRtr9+7+0+bV5KN8PAMIpPHvIsWGEHlhQEVIKgsRlIp9dWadFFqpuTK8Bm4sQMVv jEHMOhAXo61VPqQZcJIiBnIeDEHaM8/fi/TgNUp7a8xRzlqHKLCKVtOYo6TS8IhFd8IHVj7KYH KZdvkwFX9z9Wuma74NijmN7Yxyi1T0Y7c7ml3Gm2Ih5QaxdFDyUeCB4LRULtkHmM+NBhF31wqt XgRyka1yGLGdgXxLoT4LeW4P1Xlll9qbBLv9Ywj0Cb874w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f52.google.com) smtp.remote-ip=209.85.208.52; 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=1678076950; bh=mYGTpqVcxSeEZ7pAZf5N3g3mye+VAnCiTYeV9kwvI3w=; 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=F+UDuD2ckWjA0byTg8Qn8eVCbu+9jqbDFpNbqimdwB4xbzopVhNRn2Yclu+ptJFEbBDobG8iGt y+pBX6YL+5A4XnoDXE9BL0BHaVrBqo+aTdgyiWIM/U7A+a0olJIRZvtumRW5UTAvsgcQbyfAH5 N/S0y7svCLYQpcMtKR2h5Kysf4W4JDm1mvJc79Ah2acCv/54NS6ZiPkQGXSwMSGEam2rkHFT1s v1m98SFn0yGuonrAzBR0AInG2iF8D9my5vmgc3wZzAuE592DmwVIX9quOY9ID4pV5PUOuh3pNX cc3C/C7rDYiAO222roC8gB5hpvOvEqVJzJ6a5kd08GspCQ==; 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=XihKFS1Nfv3ZsSOwTKTzknWDR8fa0Y31bbAyS6WLkhs=; b=DFYahuphFEU4aZvGU/7coYnjB8 7I8+HEEA3r9wLjntbFwlfqNnjuWzo/BnHd9MMdyC/nj8kX8P+InGbU4fvxWBmXNldsGYZVaudgiKt B39KBDr0c/KWruULeumQaxaPJJ/ir5UVPHqTXShZGaMkuloMB9cEruy3ZCwlm3R31DfzBWWpW4CO2 A/UAICwBikrxCbOuLmPMK3SIGdk/4VGoDr+VCaPAa6YhfFj9AVTKQ0G++LpasGR+rS+GHSoVOq7p2 6lkqghZLRcheYiT8V+B10Gr72jWJViGCUs8jBuy+m1qs54iAkK7v8I9wIwD1o1Pf5OUJmyUkqqZRZ /1HZISnA==; Received: by zero.zsh.org with local id 1pZ2TE-000LgN-BP; Mon, 06 Mar 2023 04:29:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f52.google.com) smtp.remote-ip=209.85.208.52; 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-f52.google.com ([209.85.208.52]:46598) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pZ2Sh-000LN6-H5; Mon, 06 Mar 2023 04:28:36 +0000 Received: by mail-ed1-f52.google.com with SMTP id k10so9386665edk.13 for ; Sun, 05 Mar 2023 20:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; 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=XihKFS1Nfv3ZsSOwTKTzknWDR8fa0Y31bbAyS6WLkhs=; b=0jS80c2at7APVttgQzWv3VnM6/8HBZuWHC5xl1m4dkXwvHxGBNJpqnHTa2Nyo9Mxye 6r0OHLqAgWmmbXukym3I5EhZ5r36wdboLiYUz98Gf1ygSeSKHzvI8elhoU8ot0GMHbPC 3aGeWgPE4tcESs7CnvOmkXSqBzOyoblCKfeSQAqd6H1ZZdwy4MHl8NCpw4FvdHqiDAvc KYaS4eeF3hur8AaoDKO6ZTTEFSev3KoDp5R3QBeggu3vgul084dXJnR3WW+5toWw+v6f LdHd+XPRst2kW343f1aFaXb5DEE7p2IAEoC1ASENlP2iVNK7F4pMESHp1B1Ly0GQ+7sb uJDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XihKFS1Nfv3ZsSOwTKTzknWDR8fa0Y31bbAyS6WLkhs=; b=Hi+6S+8AbjCv91J+DjQe/3uESpEw3QSFh/WBq9uDA+aZ8mBrHFAQygnSE3uBKzvl9U DQ79k/9NigPKsdPBDZ6z4WKEY7vSWugY13pXXAYq+u1LsunWaA8TqPJOdY1b3z9Yd+gf epb47VK05u/4sjloceqWhZpCrj3lAYU/Re8ks4TCKTstpbc94Ox1ijVuGtF7fzeyM+P6 3jTNjOMCYMJ5DXWMRM3UIPMfbs3v6IGm7wKxC13i5N1ZXGdT7X+Bmq9Nw0yclkOS/MDT qgxUSX9ZwXMyv/2xorjkZFfFkwOnIkzgn7qx+jB86CDnNBdO/F2zUX+pVhmMJ9x3AqDd gKuA== X-Gm-Message-State: AO0yUKU4I1ynMYOeICzj/Ef/uO3UxW6ztVFkRU/7iUqChaJlPNS/52Ip Cvuwsvy26WEmgLN8c6uqK6+0Mogy9DTJz4C+7e9nrw== X-Google-Smtp-Source: AK7set9WNJ10VSsvIubx61x3bFNxqz0SJIyJbQsQx0mXfb7W66fcTfnNcEUl2qP3HTXMjsU2wEDuhmTKUC3tXWFyxuI= X-Received: by 2002:a17:906:ce38:b0:8b1:30da:b585 with SMTP id sd24-20020a170906ce3800b008b130dab585mr4445434ejb.6.1678076914877; Sun, 05 Mar 2023 20:28:34 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 5 Mar 2023 20:28:23 -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: 51514 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 Sun, Mar 5, 2023 at 5:34=E2=80=AFPM Felipe Contreras wrote: > > I've been investigating for a while a weird interaction with vim and > zsh, and this is the closest I've gotten to narrowing down the > problem. Seems to be a race condition or similar, related to the fact that zsh does an "exec" (without forking) of the very last external command that it's asked to run, whereas bash and most shells always fork and wait. > 2. fork with setsid (the grandchilds are sent SIGHUP) I believe there is no grandchild, because zsh has replaced itself with xdg-open. If I either run xdg-open under strace -f, or wrap it in another script that runs /bin/xdg-open "$@"; sleep 1 then it all works. What's not clear is where the HUP is coming from, if you're right about that signal. If this were a tty ownership issue, I'd expect a TTIN or TTOU. Puzzlingly, using "nohup xdg-open ..." doesn't help.