NetBSD Problem Report #1583

From gnats  Fri Oct  6 14:17:38 1995
Received: from falcon.dol-esa.gov (falcon.dol-esa.gov [204.4.3.2]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id OAA12433 for <gnats-bugs@gnats.netbsd.org>; Fri, 6 Oct 1995 14:17:28 -0400
Message-Id: <199510061816.OAA04917@owl.dol-esa.gov>
Date: Fri, 6 Oct 1995 14:16:29 -0400
From: Kenneth Stailey <kstailey@owl.dol-esa.gov>
Reply-To: kstailey@owl.dol-esa.gov
To: gnats-bugs@gnats.netbsd.org
Subject: bug in more
X-Send-Pr-Version: 3.95

>Number:         1583
>Category:       bin
>Synopsis:       bug in more
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 06 14:20:01 +0000 1995
>Closed-Date:    Fri Jul 18 14:44:15 +0000 1997
>Last-Modified:  Mon Feb 24 12:28:06 +0000 2014
>Originator:     Kenneth Stailey
>Release:        Sept 18, 1995
>Organization:
DOL/ESA/DASM
>Environment:

System: NetBSD owl 1.0A NetBSD 1.0A (OWL) #4: Wed Oct 4 15:37:44 EDT 1995 kstailey@owl:/usr/obj/sys/arch/i386/compile/OWL i386


>Description:
	"more" does not reset terminal modes under certain conditions.
	It also dumps core.  See "How-To-Repeat" for details.
>How-To-Repeat:
	Make sure that $PAGER is unset or set to "more".
	Make sure that you have an incoming email message that has more
	lines than your terminal's screen.
	Invoke "mail", use "set crt" at the "&" prompt, read message so
	that more is a child of mail.  Press "^Z".  Notice that the
	terminal has "echo" mode turned off.  You may even have a
	"more.core" file but this seems to only happen on certain
	terminal types.
>Fix:

	None yet, it's a tough one to get the debugger set up for,
	since it smashes the call stack, and uses setjmp/longjmp and
	goes off in a signal handler all at once.
>Release-Note:
>Audit-Trail:

From: Kenneth Stailey <kstailey@owl.dol-esa.gov>
To: gnats-bugs@NetBSD.ORG
Cc: gnats-admin@NetBSD.ORG
Subject: RE: bin/1583: bug in more
Date: Tue, 10 Oct 1995 00:15:58 -0400

 Hi,

 Chris Torek told me that it was not a single bug, but a combination of bugs:

 > It is a combination bug: `more' cannot tolerate two SIGTSTPs
 > in rapid succession, and `mail' copies a SIGTSTP to the foreground
 > process group, rather than just to itself.
 > 
 > (I fixed this in BSD/OS early this year.)

 These patches to mail should take care of one side of the problem.
 They do prevent "more" from dumping core on the particular dumb
 terminal I have that tickles the "more" bug into dumping core.
 However, "more" still does not restore terminal modes.

 I'll get back with the other half someday.

 --- collect.c.DIST	Mon Oct  9 23:59:24 1995
 +++ collect.c	Mon Oct  9 23:57:42 1995
 @@ -563,7 +563,7 @@
  	sig_t old_action = signal(s, SIG_DFL);

  	sigsetmask(sigblock(0) & ~sigmask(s));
 -	kill(0, s);
 +	kill(getpid(), s);
  	sigblock(sigmask(s));
  	signal(s, old_action);
  	if (colljmp_p) {

 --- lex.c.DIST	Mon Oct  9 23:59:42 1995
 +++ lex.c	Mon Oct  9 23:54:30 1995
 @@ -526,7 +526,7 @@
  	sig_t old_action = signal(s, SIG_DFL);

  	sigsetmask(sigblock(0) & ~sigmask(s));
 -	kill(0, s);
 +	kill(getpid(), s);
  	sigblock(sigmask(s));
  	signal(s, old_action);
  	if (reset_on_stop) {

 --- tty.c.DIST	Mon Oct  9 23:59:53 1995
 +++ tty.c	Mon Oct  9 23:47:34 1995
 @@ -260,7 +260,7 @@
  	sig_t old_action = signal(s, SIG_DFL);

  	sigsetmask(sigblock(0) & ~sigmask(s));
 -	kill(0, s);
 +	kill(getpid(), s);
  	sigblock(sigmask(s));
  	signal(s, old_action);
  	longjmp(rewrite, 1);
State-Changed-From-To: open->closed 
State-Changed-By: mrg 
State-Changed-When: Fri Jul 18 07:44:15 PDT 1997 
State-Changed-Why:  
fixed with new less(1). 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.