This is the mail archive of the
cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: ^Z can't suspend less in the tty mode
- To: cygwin-developers at sourceware dot cygnus dot com
- Subject: RE: ^Z can't suspend less in the tty mode
- From: "Fifer, Eric" <EFifer at sanwaint dot com>
- Date: Tue, 9 May 2000 10:41:59 +0100
- Cc: 'Kazuhiro Fujieda' <fujieda at jaist dot ac dot jp>
>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