From owner-cvs-all Fri Dec 15 17:21: 0 2000 From owner-cvs-all@FreeBSD.ORG Fri Dec 15 17:20:56 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 991EF37B400; Fri, 15 Dec 2000 17:20:55 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 16 Dec 2000 01:20:54 +0000 (GMT) To: Alfred Perlstein Cc: Matt Dillon , David Malone , John Baldwin , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sbin/fsck_ffs fsck.h main.c pass1.c pass1b.c In-Reply-To: Your message of "Fri, 15 Dec 2000 15:00:17 PST." <20001215150016.L19572@fw.wintelcom.net> Date: Sat, 16 Dec 2000 01:20:54 +0000 From: Ian Dowse Message-ID: <200012160120.aa45069@salmon.maths.tcd.ie> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20001215150016.L19572@fw.wintelcom.net>, Alfred Perlstein writes: >* Matt Dillon [001215 14:51] wrote: >> I don't have time... someone make sure those patches don't do silly thing >s >> like 'printf' from a signal handler, or one of your ^T's may corrupt your >> disks. > >Doesn't look like it does. It just sets a flag that the main loops >check and reset to 0. Yes, the signal handler is as simple as possible to avoid such problems: void infohandler(sig) int sig; { got_siginfo = 1; } Each phase in the operation of fsck consists of a loop iterating over either cylinder groups or directories. The new code tests 'got_siginfo' once at the start of each iteration and decides whether or not to do the printf; on large filesystems there may be a delay of a few seconds between the ^T and the message. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message