Mail Archives: cygwin/2004/01/21/10:34:12
On Tue, Jan 20, 2004 at 09:59:21AM -0800, Rafael Kitover wrote:
>FWIF, the code sending the EINVAL is around line 1105 in
>winsup/cygwin/fhandler_tty.cc:
>
> case TIOCSWINSZ:
> if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
> || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
> {
> if (!ioctl_request_event)
> get_ttyp ()->ioctl_retval = -EINVAL;
> else
> {
> get_ttyp ()->arg.winsize = *(struct winsize *) arg;
> SetEvent (ioctl_request_event);
> get_ttyp ()->winsize = *(struct winsize *) arg;
> killsys (-get_ttyp ()->getpgid (), SIGWINCH);
> if (ioctl_done_event)
> WaitForSingleObject (ioctl_done_event, INFINITE);
> }
> }
> break;
>
>Commenting out the second if/else allows you to send TIOCSWINSZ
>commands to the terminal, making the screens the correct number of
>lines and columns. After this you can see that screen works correctly.
>THIS IS NOT the problem though, just something I noticed. Screens
>still start with the wrong size.
On reflection, the code above (which I happened to have written) didn't
look right to me, so I did a little digging. I think I was either
confused when I wrote it or I'm confused now. Assuming, as always, that
I'm less confused now than I was then (an assumption I probably made
when I made my change in September), I've semi-reverted this code to a
state that somewhat mirrors what it used to look like last September and
am regenning a snapshot now. It will be interesting to see if this
solves the problem or not.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -