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,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7175 invoked from network); 27 Sep 2021 22:58:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Sep 2021 22:58:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1632783498; b=nd7OJXKqWHK9L7YXAp7tLXG1q0UDpsvxJYX7tWCNsyKbporvtBNrRul0BWkLakXregK5PPQ8p6 Xc4oDF2Hcrm3qmcb1MV6xzQvgBYeJ6tmx3dslDkz46L0YW3c6W67hQqTHMH4wWsGkKnrmxGsWU hpvH5RwldHuRlBbe0ODvo2Azvhyw5I7vFzTXcQc/z4odarQWPQ/BICprG7vEMzZD0QOq6/u3Lf RlVeJeK3j1d5PG7A0RxkEe1FFLUH37zQ7YW+Drcu/ycAdWt18t4PaYTm39XRnIJifD9smApxzr U29gO0POpNCmdSNR0OQeKu9B1qKgfFITz4NP0KZ5ipij4A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f180.google.com) smtp.remote-ip=209.85.166.180; 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=1632783498; bh=OHC1JxqQm0e08X6ghe41sxF2ZQu3oTX0akPcNa4bTV4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=k2lqVoru8HTFNiBska9AKH/YxnsBDrUIKc77UP+wwKR+ydR8MuTCZ8ml8Okg1iQXFkSd2ec6sP S2vOSM+pVz0X+pvPLH+hYpr/7SIJZ65Hj5RWLMmxJeqUk6EtiBhigfYwRboQU7qwqGDdJpmPgx J0m+4npNo2oMc6q0NIBYJ2we4OpvaXIAL5U5WmSYknJQYrnnYMCs0m84yMyBRSp9KYsFbQPwtB E9nqZvRY4xfLZi0r09gXkdGySHUTvsTaasSvP3b/7plWT4kTyK26HUmeb1wVIdc7xVjHvCmk7r HddorzTbmaXuC3+eCtHS0ULXTq0jm1tuzTh6IPKxkoIIcQ==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1RxZMx/rT4ruYSEVZVrKuP4cPhTXjSZy5o59/q9ZxBY=; b=DwQHkzckn2JBlFDYtKf2vGm3rD ECZCWRjtVoUI41Trtcbx1GrBAf84YvrGpScRksajFf5GS529zodAXjb0FWWzleoYK6QHAWkUO8sr1 2YNQ1CJTlPMP+MsF7Ve0EX1fvt8iIxu2FalOHmla9MLpsDtZQBtZjb0fzgRy+eIfrzIiy2XsTPPK6 EcPvy6ullGXapQoPvt231iHcUJmCOx7sn33lQLAUW0aB55XUV302WB6S6jBX0jNBMavj+1oltyLlJ 7B2XlVrodU3tdpsVg2FR/Rnw3Pkry8JFgnqWLnGPUn2gO+UOr2a8ws/gqNYSvhFbwmq/EmbUBb7KB u5QQJMDg==; Received: from authenticated user by zero.zsh.org with local id 1mUzZh-0008Q1-VB; Mon, 27 Sep 2021 22:58:17 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f180.google.com) smtp.remote-ip=209.85.166.180; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f180.google.com ([209.85.166.180]:39645) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mUzZ5-0007ja-DY; Mon, 27 Sep 2021 22:57:39 +0000 Received: by mail-il1-f180.google.com with SMTP id h9so21135948ile.6 for ; Mon, 27 Sep 2021 15:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1RxZMx/rT4ruYSEVZVrKuP4cPhTXjSZy5o59/q9ZxBY=; b=BClkHygnczPz9vJ1wJCQtYsJpdkblC5TI3AB7WiiSi16f14/5h82E6s4j6xRzKJI16 CgZF7iVsLg2hfrVX91Y36gFCbh3Y48qFBjhk+liuDvYGpmvhBMzFzkccwnzdXpymoE1o aY0tWvc75GiOy26Sjbt1XdN7oRoSaBL2/4rz7xhONbMPHb2kU9oCt1amREIaL3NWbFLq E7FHAJXidQXUpLBVDuVKuwnXiDcE9GsMuTvASdiQq0erZCb+74EgI+6NxyLooBxvNuqt K6zWVLHbHcSsDbfkWgD27QBYtqczsANsq6ItKOhQclLAkWsIPSZtVZPI8RbVbjm7HXaT YV4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1RxZMx/rT4ruYSEVZVrKuP4cPhTXjSZy5o59/q9ZxBY=; b=WLkFj8ikNAtOVJlH+bI00dk0i3tUJqMCd3HpOYivF7ZK6sdkJMNwEWDSUaxryl20iN AEZbThrkORCANzFU1vvZXlzfon6guapc0J3C+QNdX1FHg6XUMcAox/9URqVk84H+SqRu MJz7F8gx8/OGOhZWMBtRrphkTsiImZ3vxlOwtcGJ8UKpJWhAbRAlpO4HSYwCHJnvOVrr ND0NKViBuxdHngNoyFMtqPMtr+00KCrQ0xOC2HbLcaz16gVEaCJ5+hjppy1uL+nmHpnu PRoDT2R529CPuc0vbRHOxgd5hu/JSD0ouCoucW2Y35NRD8d5sM/Egzd9d6Sp3+qcIKWd W5pg== X-Gm-Message-State: AOAM531bPE56CVkNdknw23XEu11L2QIp0giuYZqpukd1mkljl9ZxaiYq EzYEmicym0fuYT5GH/2eReGp7mbvmz9olikztFA= X-Google-Smtp-Source: ABdhPJz6v8It71inW62dbaGgW4egoUixXXVaXk0zYSX+4opMoU4+FRwfS/K/KGQ+WIOc9+fNOhsv1bDthlwOY5Y+WK0= X-Received: by 2002:a05:6e02:661:: with SMTP id l1mr1938174ilt.122.1632783458098; Mon, 27 Sep 2021 15:57:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Tue, 28 Sep 2021 00:57:02 +0200 Message-ID: Subject: Re: less with subprocess To: Bart Schaefer Cc: Roman Perepelitsa , Zsh-Users List Content-Type: multipart/alternative; boundary="00000000000003e2df05cd020601" X-Seq: 27148 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --00000000000003e2df05cd020601 Content-Type: text/plain; charset="UTF-8" I am trying some variations based on suggestions from the page Roman linked: (trap 'kill -PIPE 0' INT; less -f -+F <(eval "sleep 100" )) /proc/self/fd/11 lines 1--1...skipping... /proc/self/fd/11 lines 1--1...skipping... /proc/self/fd/11 lines 1--1...skipping... /proc/self/fd/11 lines 1--1...skipping... /proc/self/fd/11 lines 1--1...skipping... /proc/self/fd/11 lines 1--1...skipping... the "skipping lines" is what is printed, I assume by less, when I press ctrl-c I can confirm that using ctrl-z and kill % is able to successfully get rid of the process, but it seems kind of an emergency measure to me, not what I would like to be my routine. It seems to me that less is eating the ctrl-c, so the trap is never called, because executing the kill -PIPE from another shell works, of course replacing the 0 with the pid of one of the processes involved, sleep or less doesn't matter. So I'm starting to think this is something that can't be solved from the shell because the shell is unable to do anything until less gives up the control, am I right? Pier Paolo Grassi Il giorno lun 27 set 2021 alle ore 23:48 Bart Schaefer < schaefer@brasslantern.com> ha scritto: > On Mon, Sep 27, 2021 at 2:38 PM Bart Schaefer > wrote: > > > > less -f =(find ...) > > Hm, never mind, interrupt kills that subprocess as well so it only > solves half the probem. > --00000000000003e2df05cd020601 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am trying some variations based on suggestions from the = page Roman linked:

(trap 'kill -PIPE 0' INT; les= s -f -+F <(eval "sleep 100" ))
/proc/self/fd/11 lines 1--1= ...skipping...
/proc/self/fd/11 lines 1--1...skipping...
/proc/self/f= d/11 lines 1--1...skipping...
/proc/self/fd/11 lines 1--1...skipping...<= br>/proc/self/fd/11 lines 1--1...skipping...
/proc/self/fd/11 lines 1--1= ...skipping...

the "skipping lines" is wha= t is printed, I assume by less, when I press ctrl-c
I can confirm= that using ctrl-z and kill % is able to successfully get rid of the proces= s, but it seems kind of an emergency measure to me, not what I would like t= o be my routine.
It seems to me that less is eating the ctrl-c, s= o the trap is never called, because executing the kill -PIPE from another s= hell=C2=A0works, of course replacing the 0 with the pid of one of the proce= sses involved, sleep or less doesn't matter.
So I'm start= ing to think this is something that can't be solved from the shell beca= use the shell is unable to do anything until less gives up the control, am = I right?

Pier Paolo Grassi
<= /div>


Il giorno lun 27 set 2021 alle ore 23:48 B= art Schaefer <schaefer@bras= slantern.com> ha scritto:
On Mon, Sep 27, 2021 at 2:38 PM Bart Schaefer <schaefer@brasslante= rn.com> wrote:
>
>=C2=A0 =C2=A0less -f =3D(find ...)

Hm, never mind, interrupt kills that subprocess as well so it only
solves half the probem.
--00000000000003e2df05cd020601--