From: Bodo Stroesser If a SIGWINCH comes in, while winch_thread() isn't waiting in wait(), winch_thread could miss signals. It isn't very probable, that anyone will see this causing trouble, as it would need a very special timing, that a missed SIGWINCH results in a wrong window size. So, this is a minor problem. But why not fix, as it can be done so easy? Signed-off-by: Bodo Stroesser --- diff -puN arch/um/drivers/chan_user.c~fix-winch_thread arch/um/drivers/chan_user.c --- linux-2.6.12-rc4/arch/um/drivers/chan_user.c~fix-winch_thread 2005-05-18 20:53:32.000000000 +0200 +++ linux-2.6.12-rc4-root/arch/um/drivers/chan_user.c 2005-05-18 21:16:55.000000000 +0200 @@ -98,13 +98,14 @@ static int winch_thread(void *arg) signal(SIGWINCH, winch_handler); sigfillset(&sigs); - sigdelset(&sigs, SIGWINCH); - /* Block anything else than SIGWINCH. */ + /* Block all signals possible. */ if(sigprocmask(SIG_SETMASK, &sigs, NULL) < 0){ printk("winch_thread : sigprocmask failed, errno = %d\n", errno); exit(1); } + /* In sigsuspend(), block anything else than SIGWINCH. */ + sigdelset(&sigs, SIGWINCH); if(setsid() < 0){ printk("winch_thread : setsid failed, errno = %d\n", errno); @@ -129,7 +130,7 @@ static int winch_thread(void *arg) while(1){ /* This will be interrupted by SIGWINCH only, since other signals * are blocked.*/ - pause(); + sigsuspend(&sigs); count = os_write_file(pipe_fd, &c, sizeof(c)); if(count != sizeof(c)) _