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 5119 invoked from network); 19 Jan 2023 16:48:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Jan 2023 16:48:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674146882; b=hv9U7HZw1CljPN5SDPb9TLk6ZuIRimP0FxtklpQvk5r5MgxLwvIWIPbtk/1JdeO1YVos309MBF pp/6ugg9v267wV9RkMtC66bB3ei2HnIhCy+CXKd8Tn7SmI6syACSpe2oARBeQLlEbnh4yAMal9 fpmGyEdnIyAIUUclWlzfS3T/pCYJlItxqDXHJBwiF8SFFDtdLpxxpfFkOeeLrseQ0/7d40ulOK 0WMLZPiBDir2kyCkE//cQD5ZIp80UAjE9PjbWLh2xAkpU0LQxEBxIFZSaCpQ+b5oBotl4yI8UN oG1fRNBPeXdinxMIANpE6chS/U4FN+i52dI+RD16uI0I/A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f172.google.com) smtp.remote-ip=209.85.219.172; 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=1674146882; bh=xeY7QX0CoSqGGg9t3xMqIs7AfTqR0hDrzJq9J4V6350=; 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=Wf8e4PeBLzDZ/7bzzF7Ok66GJfJ+Gx1UMAJLxzBAJzo57YWTj7yamVoQZn3N11mHZRKgzYL8ii 7NJ8cEp2daVaoV7sTKsgdCNUv30NiWqjn3X0ddomh6ioDDjLrXnSnoPC8Y8fuNBghovspip9ss N/WKqwlNmh1/em+tnxiOA5/RQRIvK9My8WOCtwG5hhC6Ygaxiq5PoGYcucVv8EKHSAk65rnp92 jC+ftERMWhwfuEmhlrURFBP3LOsqiQFj4AuKoZOM3hohrR/xOMznDg2QGSND0/FXpe/CTU1uV1 Wiv/N3tSyIa4wwxbAkDrrOoM7utE9VCgEIgGNfhWUB5BOg==; 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=HQApw2FKEBhPGrKYpCl/8Kh0SbP10HaXoY+lzUMmAow=; b=FeTTTY487yWL2tk4SAP2MZCGDl 6A35vbhEq6myDLUiiOLTRx9T+I4LuDfcnTIKBew0z8MUP3LU4u/t0Rq9NYJsJpW/brQ243tNv34r2 lMWdMeCh2QE3wOEEBhLKrYhKYs6/fAyprKvN2+utzYK9dgJnLMXbxs4ZvcLOjbjaCGgAu6OXLZChD ELRBJjVQE5HXFOnM+rEMclGJSYod/EuUzQpSyfC6G3/THdmVj7g3xzDXnfjurt/VuIzuzAQZZAK8G asQ07QIz5XPQWhlMLgiMjSz8B+4Z6x1MCtPgFg0g0b0XojeKsH8LFmsl44TyMsb9qp596vCkcBvq/ RWcqu4wA==; Received: by zero.zsh.org with local id 1pIY53-000AfK-Dw; Thu, 19 Jan 2023 16:48:01 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f172.google.com) smtp.remote-ip=209.85.219.172; 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-f172.google.com ([209.85.219.172]:33525) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pIXqn-0006vp-9X; Thu, 19 Jan 2023 16:33:17 +0000 Received: by mail-yb1-f172.google.com with SMTP id 20so3290280ybl.0 for ; Thu, 19 Jan 2023 08:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HQApw2FKEBhPGrKYpCl/8Kh0SbP10HaXoY+lzUMmAow=; b=ZG4Eh8C1TUh4YktLXiYeJkcmphSM5BbRZw00LxTtlBbeSKFtXrRAi7MIRQcW9ecbGJ WvfH/IDB2Wi0qJ0OPCG2ffi1qxG5jtvXFVYLUIPXRjX8kJnVFVFPp5r0JZKnJD7trQBS 59pTzNDQLlZ0t94Z5YOYTAOB94mwhKpF7PDSc1wQLwEv6ahFNZilwlElP0mwQubs4c6g CQTC6IZKyNXhOQF6+cmxJQ9/5CtiEBc6wN0Io5bOej9dcfKWZ3x6XzWBZF5xmRs9ib0q rwMzkUxCf06NCCaUKwyakNQKgQ0azwcLMtt6wiXNxTKWSBtvHuUkYCega/7Ztkd5ZiBF Uh1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=HQApw2FKEBhPGrKYpCl/8Kh0SbP10HaXoY+lzUMmAow=; b=zMplsJCT6gCVhqbZF8PZD4RBlbcmaVodwrJLy8aRsJUUJtVaIL7F6azUv5TWh6lXFI Lg9fXl0j5pOZN5ZPDcPpofSsEiDx5r1CKlfWaTpqGbtpIa1PsNXDO8jH7ExPT4NEOAh3 P3nMWlsRzx5oVH4wkpyjfIODG00bU2zH/MwH1oZ5vKkwNbXAV3So+DAMSqv/LjeVHQUU n50fwtVbrfd/0dAFrIfWgU/eqvqkEJUdym0s6Z/N54La/e6Ul6Ra2VqLChdJqAyK85nB s+Qt7ecx55t9FyxRBAJsXasyME5oeSQ+rE3L3Qp4Mg2nKQZwwDd02pMmlyO88Z8tvBEp y09w== X-Gm-Message-State: AFqh2krABW0k2A3e6+qJZkhFK4rmbr48LuBae9xAc3QSYLPgkSMc65DK loDADIm0TsBqMlilqJqgEjo3YVsFdsnCo4IKkus= X-Google-Smtp-Source: AMrXdXtEps77FGfhRX5dJfSWcdTy+9H+PijRHB8QOskMIz85FNBgv4Jnl2MLozmsPMEzWMHy3iIp+FggQb0CMCQIWvM= X-Received: by 2002:a25:8b07:0:b0:7bf:8191:8ee8 with SMTP id i7-20020a258b07000000b007bf81918ee8mr1432358ybl.476.1674145996209; Thu, 19 Jan 2023 08:33:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Roman Perepelitsa Date: Thu, 19 Jan 2023 17:33:04 +0100 Message-ID: Subject: Re: check if coproc has output To: Pier Paolo Grassi Cc: Zsh-Users List Content-Type: text/plain; charset="UTF-8" X-Seq: 28672 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: On Thu, Jan 19, 2023 at 5:24 PM Pier Paolo Grassi wrote: > > if I invoke the .exe directly, eg: > > long_running_process.exe | while etc > > the ctrl+c is handled correctly, whether if I enclose it in a function like this: > > winclip(){ > local cmd=($DOTNET_PRJ/pasteclip/pasteclip.exe $args) > $cmd "$@" > } > > doing > > winclip | while etc > > shows the ctrl-c problem I recall there were recently emails related to unkillable pipelines and maybe even commits with fixes. You might be able to find them on zsh-workers. In any case, you could try to create a minimal test case. For example, is it necessary to have a `while` loop or can you replace that with a single read? Is it necessary to invoke the specific executable or can you invoke something like `sleep 10` instead? Maybe the following hangs for you? f() sleep 10 f | read If not, what must be changed so that it starts hanging? Roman.