Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Message-ID: <779F20BCCE5AD31186A50008C75D9979171722@silldn_mail1.sanwaint.com> From: "Fifer, Eric" To: cygwin-developers AT sourceware DOT cygnus DOT com Cc: "'Kazuhiro Fujieda'" Subject: RE: ^Z can't suspend less in the tty mode Date: Tue, 9 May 2000 10:41:59 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" >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