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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23925 invoked from network); 27 Mar 2023 21:13:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Mar 2023 21:13:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1679951598; b=HU3nGoS0BksEzZZcMi4f/vsfcfxCt94iidVz93zfttipGNZYVijU4aX8ZszdlKE9nznBCw3JLn Ep/aYt7JJdrxP74Ws+IiYKUC0BroNhBkWwuhjskgIjPAnfVyCaSbQWCj4tInaS+zp3FtMpEpAB Nukc9bLaLBrnfOOSrM5GGxUITJOTIYBe2M/c8sJsZ2EjwLPZtlGysUcKzEEG2k7oK08Norcr0s 7XpXG5zNRnsASzChiPqls1BDT0HGMoti/wxmHjap5IAI42UIkhN40fpnSRB1ZWWYO9GgbVSQsp skR8qhmbf54+dHrxWIwe0nbwG+e9CWbAJ9lswRIgwD6Vew==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f176.google.com) smtp.remote-ip=209.85.219.176; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1679951598; bh=YoEoeFfbekqKmr4LvntHoMk+dwwgty/r4J+PIK/bXYY=; 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=mPx63sFYN6DF4B9tw2akM3z6uQxfZuVOtgR3I5OwVYBLa0RQ4+0aYdSONrf0Y2JSqxQPXKip/G msoyq15qC/Fq5mUGH0r657/ySqFywrUTcb3VuhNTHW+21X0CBifhh79rgHEpCmS3Pr6SW2Bafb mJ1pvn8q/HWQIQQx3XOZsygr3fVijiwifS6lwZbrv0KkXgsg8w43OkS8Ja08AaJ6ZBFiRsTqcV 2PEDaaupWuJ3GPb4C7XC1hWJuZ/yKT5NyfPDpIyUi+ypkQkDlUg4a+k7TW7II+HSLihGvjGhFi qPUOClIhKyWdrvpTNa0NQWAyHawiabi5lWVw17eAnfCekQ==; 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=NW/MZoGDUrQl9NS0FPZH5SCip1wgLJC+RSFLA46MdAo=; b=WTi6F4XUQRKkSjy57EktM3BE6P qn7EH7QI4LjGtkireX9cDNNWj0A0Ire4wIiLWxcS1f+49FB8mw8QYrYRlOVIWmXMWiAtBW1WNvupE 5P0NPB4512xhi3iI/lmD30NNoeUQNchufYJFC4v19Umis9KybV7uPwP6yaNdI+32IHQK+Nxc573k7 DMHIAQAgD3n9WbN5aqMKsjiqDKAwJpzCdoM0obxHWF5me3p5KIL06rRGP5znprAO6z48yJvcAcReH d9BW60QxEHevyliuSiIoL6Mn0kpFG5pbGOp0cQAwspU8+kmPbowATRiAProFMxrDfqg0zSlQ9wppE nnPIN6Wg==; Received: by zero.zsh.org with local id 1pgu9U-0004g1-AW; Mon, 27 Mar 2023 21:13:16 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f176.google.com) smtp.remote-ip=209.85.219.176; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yb1-f176.google.com ([209.85.219.176]:36545) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pgu9D-0004NU-56; Mon, 27 Mar 2023 21:13:00 +0000 Received: by mail-yb1-f176.google.com with SMTP id y5so12523894ybu.3 for ; Mon, 27 Mar 2023 14:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679951578; 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=NW/MZoGDUrQl9NS0FPZH5SCip1wgLJC+RSFLA46MdAo=; b=iWdAXni/z/HH73eajk8V7KtAKsEThf9F9VM5LEE16K81yvYuWV1EaIZeSU8wAF5yql mMngoyDXZHi7HndWakUwiPm5DAyTnsh4LvGuRQ+GIsVE8/fc0OA2nuGB+cqxVQYg+8xX ZQ2TGlgwObgxcZcskKSu7x8R+3VbPeyVhrqKMYxnwRRW1I2EaaA3yCUuOd3mX9oNrqdq YfkPVWzym6RxT4c8u6Mk9Q3ZNRMB7ISDauDTVlt6LNfJBp+DUt1HgSJuv5uF9nV612Av 1tnxQYAT6B9uUtlnRJYG9qkiJGDDoUXrDKIZ/K5mxjAFF4Iyv01k5LP6RqsnwoG0vtoX aCFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679951578; 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=NW/MZoGDUrQl9NS0FPZH5SCip1wgLJC+RSFLA46MdAo=; b=P5NqN0vCDLMHilj6PZKlvK81u84tLrOim/EuNrn5aFDNAp1bSoobSNpjgYpnImW8D7 795vtc433a/chRDjHUb9fDAZ+ImQBBniwltEXGmedR6fmwMLA4kLLVF5phwCThUkOnef VeqKjR+doTI5qMmV9jXO176loXfBCuncwRyVXfr0dgcA/2+AGlUXDZj+s3p1MeVvy6ba b4QHVQmnzzQoUKg8Nlq3gR7LW4cw5tu1sA1WEuIRy82GBG+0glBBarVEUuA/L4cbZ4fu a37vJUIB1vZ9RbNos0G85PNtuP/u/2nuTo5vqwXtLjJH/I+3y0+0i96J6zkpie3pGFuY W1jg== X-Gm-Message-State: AAQBX9ctoqFxXbA/rd7Cgl3nR9NZAGKfdOni63QCQwB4knVXrcloP1YX elrNcUKr6sPun/kZgV49CAmClQEw/HhKIU63HS0= X-Google-Smtp-Source: AKy350ZRyjzdcN6kw9BJlmLjNnEhxGE6jcJTjBHfRcb/s+dZgIH5nq3CQGmPze1YzjxaaAsbMNtZILMvhRos+xI9euw= X-Received: by 2002:a05:6902:1083:b0:b69:ca6f:452c with SMTP id v3-20020a056902108300b00b69ca6f452cmr8434777ybu.0.1679951577746; Mon, 27 Mar 2023 14:12:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Felipe Contreras Date: Mon, 27 Mar 2023 15:12:46 -0600 Message-ID: Subject: Re: Weird interaction between zpty and trap To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51605 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 Wed, Mar 22, 2023 at 5:07=E2=80=AFPM Felipe Contreras wrote: > > On Wed, Mar 22, 2023 at 4:06=E2=80=AFPM Bart Schaefer wrote: > > > > On Tue, Mar 21, 2023 at 9:50=E2=80=AFPM Felipe Contreras > > wrote: > > > > > > Should the command executed by zpty keep the EXIT trap? > > > > Tough call. It's technically a subshell, so by that distinction it > > should follow the rules for subshells. > > The documentation of trap says: > > ZERR and DEBUG traps are kept within subshells, while other traps are= reset. > > That sounds like EXIT should be reset. OK. I'm just going to assume it's a bug in zsh I'll have to workaround by removing the EXIT trap manually every time inside the zpty subshell. --=20 Felipe Contreras