HPUX: ssh hangs after shell exit

Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
Fri Jun 8 01:36:16 EST 2001


On Thu, Jun 07, 2001 at 09:57:48AM -0400, Aaron Bush wrote:
> openssh-unix-dev at thewrittenword.com wrote:
> > 
> > On Tue, Jun 05, 2001 at 05:30:45PM -0400, Aaron Bush wrote:
> > > The problem i am having appears to be similar to what others have
> > > reported where after typing exit in an interactive shell the connection
> > > is not closed unitl an additional _one_ key stroke is issued (space-bar,
> > > enter, etc...).
> > >
> > > The sshd server is OpenSSH_2.9p1 on HPUX-11.00.  I have tried connecting
> > > using the OpenSSH_2.9p1 ssh client from Linux-2.4, HPUX-11.00 and
> > > FreeBSD-4.2.  The behavior so far is _always_ consistent:
> > 
> > We have *no* problems with 2.9p1 on HP-UX 11.00 here. We do use the HP
> > commercial C compiler to build it.
> > 
> > --
> > albert chin (china at thewrittenword.com)
> 
> I am using gcc 2.95.2 and the problem does exist.  
> I have not tried the HP ANSI C compiler though.

I am using HP's compiler on 10.20 and the problem is there but not
reproducable. Sometimes it happens, sometimes it does not.

With respect to HP's documentation, on 10.20 the manual page for
sigaction states:
           SA_RESTART             This flag affects the behaviour of
                                  interruptible functions; that is, those
                                  specified to fail with errno set to EINTR.
                                  If set, and a function specified as
                                  interruptible is interrupted by this
                                  signal, the function will restart and will
                                  not fail with EINTR unless otherwise
                                  specified. If the flag is not set,
                                  interruptible functions interrupted by
                                  this signal will fail with errno set to
                                  EINTR.
The select() manual page states:
           [EINTR]        The select() function was interrupted  before any
                          of the selected events occurred and before the
                          timeout interval expired. If SA_RESTART has been
                          set for the interrupting signal, it is
                          implementation-dependent whether select() restarts
                          or returns with EINTR.

Therefore we cannot rely on select() being interrupted when SA_RESTART
is set. It is implementation dependent, whatever this means on a specific
version of HP-UX. But the authors of the documentation specificly wanted
to point out that we should not rely on a specific behaviour.

Best regards,
	Lutz
-- 
Lutz Jaenicke                             Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153



More information about the openssh-unix-dev mailing list