This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: ^Z can't suspend less in the tty mode



>This is a long standing problem. ^Z can't suspend the `less'
>command in the tty mode.

This has been annoying me too ...

What is happening is that when SIGTSTP is caught the signal
handler does a longjmp().  And, when the thread restarts at the
setjmp() the signal mask is not restored.  This is a patch against
less-354 (from http://home.flash.net/~marknu/less/ ) which fixes
the problem:

--- os.c-	Mon Mar 06 11:58:01 2000
+++ os.c	Mon Mar 06 12:21:46 2000
@@ -99,6 +99,7 @@ iread(fd, buf, len)
 		 * We jumped here from intread.
 		 */
 		reading = 0;
+		{ sigset_t mask = 0; sigprocmask(SIG_SETMASK, &mask, NULL);
}
 #if HAVE_SIGSETMASK
 		sigsetmask(0);
 #else

I'll send a more complete patch to the author ...

Eric Fifer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]