From owner-cvs-bin Wed Nov 5 15:40:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA19032 for cvs-bin-outgoing; Wed, 5 Nov 1997 15:40:20 -0800 (PST) (envelope-from owner-cvs-bin) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA18657; Wed, 5 Nov 1997 15:35:23 -0800 (PST) (envelope-from ache@FreeBSD.org) From: "Andrey A. Chernov" Received: (from ache@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id PAA07555; Wed, 5 Nov 1997 15:34:00 -0800 (PST) Date: Wed, 5 Nov 1997 15:34:00 -0800 (PST) Message-Id: <199711052334.PAA07555@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-bin@FreeBSD.ORG Subject: cvs commit: src/bin/sh trap.c Sender: owner-cvs-bin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk ache 1997/11/05 15:34:00 PST Modified files: bin/sh trap.c Log: 1) Fix longstanding bug: trap 'echo xxx' 1 2 3 15 read x is not interrupted by ^C (due to restartable read syscall) and must be interrupted per POSIX Worse case: read -t 5 x hangs forever after ^C pressed (supposed to timeout after 5 secs) Fixed by adding siginterrupt(signo, 1) after catch handler installed 2) Do not reinstall sighandler immediately after it is called, BSD do it for us Revision Changes Path 1.9 +10 -3 src/bin/sh/trap.c