Hi,

I have a doubt wrt openssh-4.5p1 code in the way write is handled in
case of a EINTR.

Current codein packet.c :void packet_write_poll(void)

if (len > 0) {
len = write(connection_out, buffer_ptr(&output), len);
if (len <= 0) {
if (errno == EAGAIN)
return;
else
fatal("Write failed: %.100



While sshd is blocked on write , if signal comes , it returns fatal
error. Why do we do this?
Shouldnt we take care of EINTR also to return so that write can be
called again

as
if ((errno == EAGAIN)||(errno == EINTR))
return;


To my understanding (from reading of man page) an EINTR is returned if
a signal is caught before any data is written. So shouldnt we continue
instead of doing an exit???


Thanks
Reji Thomas