Re: [PATCH] making dump EINTR resistant
Alexander Leidinger <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected] with "unsubscribe freebsd-audit" in the body of the message