From olli@dorifer.heim3.tu-clausthal.de  Wed Feb 11 08:49:56 1998
Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA01766
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Feb 1998 08:49:15 -0800 (PST)
          (envelope-from olli@dorifer.heim3.tu-clausthal.de)
Received: (from olli@localhost)
	by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id RAA27213;
	Wed, 11 Feb 1998 17:49:02 +0100 (CET)
	(envelope-from olli)
Message-Id: <199802111649.RAA27213@dorifer.heim3.tu-clausthal.de>
Date: Wed, 11 Feb 1998 17:49:02 +0100 (CET)
From: Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
Reply-To: oliver.fromme@heim3.tu-clausthal.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: "more" coredumps when sent two signals
X-Send-Pr-Version: 3.2

>Number:         5721
>Category:       bin
>Synopsis:       "more" coredumps when sent two signals
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hoek
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 11 09:00:01 PST 1998
>Closed-Date:    Thu Jul 30 21:05:10 PDT 1998
>Last-Modified:  Thu Jul 30 21:06:59 PDT 1998
>Originator:     Oliver Fromme
>Release:        FreeBSD 2.2-971223-SNAP i386
>Organization:
Administration Heim 3 (Technical University of Clausthal)
>Environment:

`uname -a`:
FreeBSD dorifer.heim3.tu-clausthal.de 2.2-971223-SNAP
FreeBSD 2.2-971223-SNAP #0: Sun Feb  1 16:24:13 CET 1998
olli@dorifer.heim3.tu-clausthal.de:/usr/src/sys/compile/DORIFER  i386


>Description:

/usr/bin/more coredumps (with various signals, obviously SIGBUS
most of the time) if it receives two signals in short succession.
This could be reproduced on several 2.2.x machines.


>How-To-Repeat:

At a shell prompt, type:
   /usr/bin/more /some/large/file
In another shell, find out the PID of that more and then type:
   kill -TSTP <PID>; kill -TSTP <PID>
This has to be on one line, so the two signals are sent in
short succession.


>Fix:

--- os.c.orig	Fri May 27 14:30:45 1994
+++ os.c	Wed Feb 11 09:53:16 1998
@@ -180,6 +180,7 @@
 
 intread()
 {
+	reading = 0;
 	(void)sigsetmask(0L);
 	longjmp(read_label, 1);
 }

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->hoek 
Responsible-Changed-By: hoek 
Responsible-Changed-When: Mon Jul 20 14:17:30 PDT 1998 
Responsible-Changed-Why:  
Keep all more(1) prs together... 

Also, save a follow-up to and note that this does in fact still repeatt, 
although it takes a couple tries.... 
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Thu Jul 30 21:05:10 PDT 1998 
State-Changed-Why:  
Suggested fix applied in r.1.4 more/os.c, thanks! 

(I'm a little curious as to how you ran into this bug? :) 
>Unformatted:
