SIGWINCH is the signal on many UN*Xes signifying "window size changed". In other words, the number of rows or columns of the tty controlling the process has changed.

Now, on a real tty, this is impossible! A VT100's screen size doesn't change! (Well, actually it can go from 80 columns to 132 columns, but the OS gets no indication when this happens.) But when was the last time you saw a VT100?

With e.g. a windowing system, things are different. If you run a terminal emulator window (e.g. xterm, rxvt, or the modern KDE/GNOME monstrosities), it is very easy to change the size of the terminal. The terminal emulator arranges to send this signal to its foreground process.

Screen-based programs (typically curses-based, but not necessarily) like vi, less, more, pine or emacs (when running in text mode) will recognise SIGWINCH; they use it to reconfigure their display accordingly. For instance, less will redisplay a different number of lines, and change its default paging to go forward a whole screen.

telnet and rlogin also need to know about SIGWINCH: it is generated at the client end, but programs running at the server end need to process it. So it is appropriately passed along (as urgent data) from client to server, then raised at the foreground process running on the server's pty.

Log in or registerto write something here or to contact authors.