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 6998 invoked from network); 19 Oct 2022 10:04:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Oct 2022 10:04:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666173898; b=Hfcy9DHTxORzzL/S9QH/wWn0tNv/9JG7a38sy3aN+HcBfXUJkwaK0y72ECuABV0trhIgRBq8cO ABNVAuEqAGyKYRCYNhfJDY6rb6VHKLkMZI1Zp0hgjsw3+EiKXmUnbNSbNgQFhCj77PetrYcuyJ AmI6O5b2M7r57fOEfihsi02haP75Shd+d4ZPKzg55tpjyAW/2BQ0xIJZS7GQiiFLHUkBHDpKvl yqoOyhBnWKGN20xluKIuYKMtsAEWkw+8I3isrlFl0YxQicx9KkbCm+7f9JZjGq3c7B1ZuwxvSE dhawUMBzDa5GfGQ/o4Y1x1/gIRkgaaybly9I7iLksTzNNg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd00106-bg.im.kddi.ne.jp) smtp.remote-ip=222.227.84.38; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666173898; bh=2LqYRktEyDN/c6+LWD9SLMiYcsMK4ijPJ719kyweSaw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature; b=XbMVDulURJ433c96gwZdRuxVh9Fqrdzp51GlQ2wTNELZuje9e3Ek1TGPCUUg+u/bl8OeE0wuA3 oeRIkBZUuFL9VhcZvd8zm+6mbD2zQA6wwJjVIbUzu7gYY2lXInOOf2ajT12h4Vg4uiph3nQrZT y/kQ6aCUDtzHcgHm2YF+3OOpNXs4pdbhLyvjMQG0HWDxkTUTx/VM2pl44NP2qRNyT7Ky+A3hMQ /SSFuI6G5VPdLAUOuxZE0bwmPoqGUttKKB0TYcOXJWR3J1h9WoPxwT+1Wje3ASDOy7BJObkSiM HDKkE8uQUzQYwA+J3H1POCfXRwhCucrUgioaFwVdfJtQZQ==; 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:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=rGzFO5yUHdW31+teyxTXg0prOW34AmSiyOvzgwP1bAg=; b=FnyvUxEx/zzr4LZPC8WCdTqd5w soMlN7nthdg5w+7AXEzLA7jIgV61+QkSOEkmpOTmm3Xdg5s24WZQv4MybgWrAkBGDLReVeTZTrcMJ hno/4yfAmJYyLgXDD53UjzE0DRoGn4xmooZBSk+pg1G2haJosh9Inyjgc6N57K2GH9VR6B22dhAFk HB4F+XUhSi2Ev9BmC9TXSdKLfSum7t5CMhTHzAqPnl+R0iC3SVvH5JFI8y1iwad0NtEsQ8V2Zc3Js Xp26eIpTqbeG6mZvO33BCxrF+qWTkV4C+Q5y9esWOGuxRwzDYM2xhg4hiK2eNIGhTkCL0bzEE7SVA 6Gw1jF2Q==; Received: by zero.zsh.org with local id 1ol5wX-0009Bd-N8; Wed, 19 Oct 2022 10:04:57 +0000 Authentication-Results: zsh.org; iprev=pass (snd00106-bg.im.kddi.ne.jp) smtp.remote-ip=222.227.84.38; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd00106-bg.im.kddi.ne.jp ([222.227.84.38]:51969 helo=omta0002.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1ol5wD-0008pG-N2; Wed, 19 Oct 2022 10:04:39 +0000 Received: from dfmta0002.biglobe.ne.jp by omta0002.biglobe.ne.jp with ESMTP id <20221019100434439.GPCY.3725.dfmta0002.biglobe.ne.jp@biglobe.ne.jp>; Wed, 19 Oct 2022 19:04:34 +0900 Received: from mail.biglobe.ne.jp by omta0002.biglobe.ne.jp with ESMTP id <20221019100434369.THJW.3180.mail.biglobe.ne.jp@biglobe.ne.jp>; Wed, 19 Oct 2022 19:04:34 +0900 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: problem with 'ls | less' shell function From: Jun T In-Reply-To: Date: Wed, 19 Oct 2022 19:04:34 +0900 Cc: Thomas Klausner Content-Transfer-Encoding: 7bit Message-Id: References: To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.104.21) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 50795 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: Sorry, I didn't notice this post: > 2022/10/19 17:26, zsugabubus@national.shitposting.agency wrote: > > $ f(){echo|sleep 60} > $ f > ^Z > $ fg > ^Z^Z^C^C^C^C^C^\ Thnaks. Now I understand that we need to use function to reproduce the problem. % ls | less # works fine but % dir () { ls | less } % dir # this has the problem > 15bf8ace168a86d0fae90b10e9f706baddd4c0bf is the first bad commit > 50134: Tweak process group handling to prevent unkillable pipelines Thanks again. > I think what happens is that zsh fails to correctly set the foreground > process group in `fg`. `less` is not in the foreground pgrp that's why > it immediately gets suspended by SIGTTIN after it receives SIGCONT. Yes, and I guess it is related with the code in wait_for_processes(), signals.c, lines 540-557.