From owner-freebsd-audit Wed Jun 5 1:18:40 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mailout09.sul.t-online.com (mailout09.sul.t-online.com [194.25.134.84]) by hub.freebsd.org (Postfix) with ESMTP id 6AFCC37B406; Wed, 5 Jun 2002 01:18:37 -0700 (PDT) Received: from fwd07.sul.t-online.de by mailout09.sul.t-online.com with smtp id 17FW01-0001sJ-05; Wed, 05 Jun 2002 10:18:33 +0200 Received: from Magelan.Leidinger.net (520065502893-0001@[80.131.127.20]) by fmrl07.sul.t-online.com with esmtp id 17FVzr-2CwM40C; Wed, 5 Jun 2002 10:18:23 +0200 Received: from Leidinger.net (netchild@localhost [127.0.0.1]) by Magelan.Leidinger.net (8.12.3/8.12.3) with ESMTP id g558JnPP000786; Wed, 5 Jun 2002 10:19:53 +0200 (CEST) (envelope-from netchild@Leidinger.net) Message-Id: <200206050819.g558JnPP000786@Magelan.Leidinger.net> Date: Wed, 5 Jun 2002 10:19:49 +0200 (CEST) From: Alexander Leidinger Subject: Re: [PATCH] making dump EINTR resistant To: bde@zeta.org.au Cc: netchild@FreeBSD.ORG, audit@FreeBSD.ORG, bhlewis@wossname.net In-Reply-To: <20020605083335.T5376-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Sender: 520065502893-0001@t-dialin.net Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 5 Jun, Bruce Evans wrote: >> Comments? > > read(), etc., are supposed to be restarted after signals, so the EINTR > checks should have no effect in most cases. Yes, I wanted to handle it with sigaction & SA_REASTART, but the APUE book teached me, that signal(3) does restart interrupted syscalls by default on 4.3(+)BSD. Therefore I handled it with do-while code. Stevens lists only ioctl, read, readv, write, writev, wait and waitpid, but not open, fopen, close and fclose. What about those? - I've seen an EINTR related error once on a 4.x system. I can't remember, but I think it was related to an open(2) call. - Benjamin sees such errors on -current, seems there's something broken. Bye, Alexander. -- Actually, Microsoft is sort of a mixture between the Borg and the Ferengi. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message