From owner-freebsd-stable Mon Mar 5 13:47:29 2001 Delivered-To: freebsd-stable@freebsd.org Received: from taltos.taltos.org (64-6-187-7.sfo3.phoenixdsl.net [64.6.187.7]) by hub.freebsd.org (Postfix) with ESMTP id B6F4A37B719 for ; Mon, 5 Mar 2001 13:47:23 -0800 (PST) (envelope-from carson@taltos.org) Received: from [10.10.1.2] (athyra.taltos.org [10.10.1.2]) by taltos.taltos.org (Postfix) with ESMTP id 63939283C9 for ; Mon, 5 Mar 2001 13:47:23 -0800 (PST) Date: Mon, 05 Mar 2001 13:47:25 -0800 From: Carson Gaspar Cc: stable@FreeBSD.org Subject: Re: more strange problem with broken pipes and ssh Message-ID: <45119937.983800045@[10.10.1.2]> In-Reply-To: <200103040318.TAA25378@salsa.gv.tsc.tdk.com> References: <200103040318.TAA25378@salsa.gv.tsc.tdk.com> X-Mailer: Mulberry/2.1.0a2 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --On Saturday, March 03, 2001 7:18 PM -0800 Don Lewis wrote: > } > grep: writing output: Broken pipe > I'm seeing this problem with makewhatis. I believe the problem is > that sshd is setting the SIGPIPE handler to SIG_IGN, so when you > run a pipeline of processes and the reader exits early, the writer > gets an EPIPE error instead of getting silently killed with a SIGPIPE. > > I believe the fix is to call "signal(SIGPIPE, SIG_DFL)" in do_exec_pty() > in session.c. > > I wonder if this problem might be shell dependent. Maybe some shells > reset SIGPIPE to SIG_DFL and some don't modify whatever they inherit. > I'm seeing the problem with csh. What shells are everyone else running? Any app that cares about SIGPIPE should set it appropriately. If makewhatis and grep don't, please fix makewhatis and grep. That _doesn't_ mean that we shouldn't make sure SSH leaves things mostly the same way other login sessions do, just that we should _also_ fix broken programs. -- Carson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message