rlogin, SIGWINCH and TIOCPKT_WINDOW with Solaris server
Anthony & Yinkwan
Mon Jan 1 11:51:00 GMT 2001
Further investigation, based on the Cygwin source, Stevens' book and
truss'ing the Solaris rlogin client, leads me to believe that the
rlogind should be using the MSG_OOB flag to send the TIOCPKT_WINDOW
control byte to the client ... the child process on the client-side
should receive a SIGURG signal from the system prompting it to do the
out-of-band processing that results in a SIGUSR1 being sent to the
parent process on the client-side which initiates the window change management.
I'm certain that the Cygwin rlogin client is not receiving a SIGURG from
which you can deduce that it's either not being initiated at the server
side, or not being generated by the client system.
When I truss the Solaris rlogin client I get the following interesting
554: getpid() = 554 
554: ioctl(4, FIOSETOWN, 0xEFFFFA84) = 0
554: kill(554, SIGURG) = 0
554: Received signal #21, SIGURG [caught]
554: siginfo: SIGURG pid=554 uid=0
554: poll(0xEFFFC5C0, 1, 0) = 1
554: ioctl(4, 0x40047307, 0xEFFFF630) = 0
554: recv(4, "80", 1, 1) = 1
554: kill(550, SIGUSR1) = 0
550: Received signal #16, SIGUSR1, in read() [caught]
550: siginfo: SIGUSR1 pid=554 uid=0
550: read(0, 0xEFFFFAAF, 1) Err#4 EINTR
... unless I'm reading things incorrectly, this indicates that the
client-side child process sends a SIGURG to itself (3rd line) !
I added the kill to the Cygwin code as follows :
SN8981335729 # diff rlogin.c rlogin.c.orig
... et voila, things work ! ... is it a hack, or does it make sense ?
Anthony & Yinkwan wrote:
> Hmmm ... I'm running the Cygwin rlogin client in an xterm and logging
> into a remote Solaris 2.6 server ... I would dearly like even the
> initial window size to be properly propagated to the remote server, not
> to mention subsequent changes to the xterm window size, but it seems
> that the expected TIOCPKT_WINDOW indicator is not being sent by the
> server when the session is established ... does anyone have any idea why ?
> By the way, if I manually send a SIGUSR1 signal to the parent process,
> or a SIGURG to the client everything works ... I think it looks like a
> Solaris server-side issue !
> I'm off to celebrate New Year now, so I suspect I'll have to wait for
> next year for an answer on this !
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin