From owner-freebsd-hackers Thu Dec 17 06:04:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA29470 for freebsd-hackers-outgoing; Thu, 17 Dec 1998 06:04:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA29465 for ; Thu, 17 Dec 1998 06:03:58 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id PAA16096; Thu, 17 Dec 1998 15:03:49 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id PAA93072; Thu, 17 Dec 1998 15:03:49 +0100 (MET) Message-ID: <19981217150348.V68793@follo.net> Date: Thu, 17 Dec 1998 15:03:48 +0100 From: Eivind Eklund To: David G Andersen , Alfred Perlstein Cc: karl@Denninger.Net, hackers@FreeBSD.ORG Subject: Re: yup, found it (NFS) References: <199812170644.XAA03482@lal.cs.utah.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199812170644.XAA03482@lal.cs.utah.edu>; from David G Andersen on Wed, Dec 16, 1998 at 11:44:57PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Dec 16, 1998 at 11:44:57PM -0700, David G Andersen wrote: > Lo and behold, Alfred Perlstein once said: > > as an interrupt) is sent to a process waiting for an NFS server, > > the corresponding I/O system call returns with a transient error. > > (*1) Normally, the process is terminated by the signal.(*2) > > Right. This is simply having the system call return EINTR, one of the > options I duscuss. However, it's not clear to me that this is the best > option when the action was triggered by a close() on a file descriptor. > Certainly, if it happens during a write, most processes know how to cope > with it -- and the kernel does the right thing, returning EINTR. However, > when flushing a dirty block during a close, and you get an intr, what do > you expect to do? Retry the close(), or wait for program termination. Any daemon should be careful about the return value from close(0. Or you could of course do something totally vile like this: Have the kernel fork the process. Have one of them continue the close(), screw the file-descriptor in the other one and return OK. When the sleep is over, finish the close and suicide. In _all_ cases you should allow SIGKILL to actually kill the process _somehow_. Screw dirty blocks, I want to be able to kill processes even if some stupid server in a locked room over there is dead. If I didn't want to be able to make my system behave, I'd be running NT. Eivind, who expect to be flamed over that one even though he _did_ call it totally vile. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message