patches for UnixWare v2.x pty (misc.c,configure.in)

Damien Miller djm at mindrot.org
Sat Feb 17 01:14:58 EST 2001


On Fri, 16 Feb 2001, Kevin Steves wrote:

> it's my understanding that we can't have select() automatically
> restarted in clientloop, because we won't then get to check the SIGWINCH
> handler flag immediately.
> 
> this is what hp-ux 11.0 select() says:
> 
>            [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.
> 
> and hp-ux select *does* restart select when SA_RESTART.

Damn. Solaris & Linux don't, I suspect that SCO doesn't either.

We might have to make it platform specific - we can't go wrapping
every syscall in while ret==EINTR loops.

> also, i changed the SIGWINCH handler to use mysignal (without
> SA_RESTART) and it fixed the problem noticed by itojun about having to
> enter a character before SIGWINCH was processed.  that's interesting.

Are you sure? Mine started working correctly when I updated all my
systems the other day - I thought that this was due to Theo's twiddling
with the clientloop.c stuff.

> so if we plan to move signal()->mysignal() everywhere, we can't just
> always set SA_RESTART.

Could we set it by signal? "if (signum == SIGCHLD) flags |= SA_RESTART"?

-d

-- 
| Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's 
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer






More information about the openssh-unix-dev mailing list