delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/05/09/04:40:22

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
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" <EFifer AT sanwaint DOT com>
To: cygwin-developers AT sourceware DOT cygnus DOT com
Cc: "'Kazuhiro Fujieda'" <fujieda AT jaist DOT ac DOT jp>
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)

>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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019