Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2002 10:26:01 +0200 (CEST)
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Todd.Miller@courtesan.com
Cc:        drosih@rpi.edu, bde@zeta.org.au, netchild@FreeBSD.ORG, audit@FreeBSD.ORG
Subject:   Re: [PATCH] making dump EINTR resistant
Message-ID:  <200206050826.g558Q1PP000831@Magelan.Leidinger.net>
In-Reply-To: <200206050110.g551Alpu020379@xerxes.courtesan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On  4 Jun, Todd C. Miller wrote:

>> Would it be acceptable to add EINTR-type checks to freebsd-ish
>> code?  There are some sections of lpr/lpd which do not work
>> right when compiled on other platforms, unless I add EINTR
>> checks at the right places.
> 
> It would probably be better to just make the code in question to
> just use sigaction() if you are concerned about portability.  That
> way you get consistent handling of syscall restarts.

Acording to the APUE book signal(3) is supposed to restart interrupted
system calls on 4.3(*)BSD but not on V7, SVR2, SVR3 and SVR4. sigaction
with SA_RESTART is supposed to DTRT on 4.3+BSD and SVR4. Stevens lists
ioctl, read, readv, write, writev, wait and waitpid as system calls
which get automatically restarted. Our man pages also have EINTR for
open (+ fopen) and close (+fclose).
I've seen an EINTR related error once on a 4.x system, I think it was an
EINTR from an open(2) call.

Bye,
Alexander.

-- 
Failure is not an option. It comes bundled with your Microsoft product.

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206050826.g558Q1PP000831>