On 2001-Feb-04 13:08:02 -0800, Matt Dillon <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to