From owner-freebsd-stable Tue Feb 6 13:54:49 2001 Delivered-To: freebsd-stable@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 4E6C937B491 for ; Tue, 6 Feb 2001 13:54:30 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id IAA03989; Wed, 7 Feb 2001 08:53:49 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37645) with ESMTP id <01JZTMYYWSLSO2IXMB@cim.alcatel.com.au>; Wed, 7 Feb 2001 08:53:45 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f16LrgF74143; Wed, 07 Feb 2001 08:53:42 +1100 (EST envelope-from jeremyp) Content-return: prohibited Date: Wed, 07 Feb 2001 08:53:42 +1100 From: Peter Jeremy Subject: Re: installworld anomoly In-reply-to: <200102042108.f14L82U16403@earth.backplane.com>; from dillon@earth.backplane.com on Sun, Feb 04, 2001 at 01:08:02PM -0800 To: Matt Dillon Cc: Kris Kennaway , Brian Dean , freebsd-stable@FreeBSD.ORG Mail-followup-to: Matt Dillon , Kris Kennaway , Brian Dean , freebsd-stable@FreeBSD.ORG Message-id: <20010207085342.X90937@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20010203154344.B27418@vger.bsdhome.com> <20010203125044.A40718@xor.obsecurity.org> <200102042108.f14L82U16403@earth.backplane.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2001-Feb-04 13:08:02 -0800, Matt Dillon wrote: > It's not a bug with OpenSSH, it's a bug with 'makewhatis'. The > 'makewhatis' perl script is closing the input descriptor without > draining all the input. If the gzcat writing the descriptor does > not use a large enough buffer, the gzcat's write() will then fail. > > This is not a bug with gzcat or a bug due to the pipe being too small > (there is no 'right' size for the pipe), it's a bug with 'makewhatis', > and a very easy bug to fix too. I disagree with this fix. By default, a write to a pipe with no reader will cause a SIGPIPE. The default action for SIGPIPE is to terminate the process quietly. OpenSSH has set SIGPIPE to SIG_IGN, resulting in a write to a pipe with no reader returning EPIPE. gzcat is correctly detecting that the write failed, reporting an error and exiting. Firstly, OpenSSH should not be changing the default signal behaviour passed onto it's children. This _is_ a bug and should be fixed. Secondly, making makewhatis(1) read all available input before closing the pipe is just unnecessarily slowing down makewhatis. There's no reason for makewhatis to process an entire man page - it just needs the name and synopsis. Once it has read that, it should dispose of that man page and move onto the next ASAP. There's no point in making gzcat uncompress the entire man page. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message