Doug McNaught wrote:
> c) treat EINTR as an I/O error (I don't know how easy this would be)
So then at this point - it is detected, so problem solved?
If a LOCAL hard drive fails to reply, you hang. Same with hard,intr
NFS file system.
bytesRead = read(fd, buffer, requestedBytes);
if (bytesRead < 0) {
switch (errno) {
case EAGAIN:
#ifdef USING_RECORD_LOCKING_OR_NON_BLOCKING_IO
...do the above read() again...
#else
/*FALLTHRU*/
#endif
default:
... log error and errno...
break;
}
} else if (bytesRead == 0) {
...AT EOF...
} else if (bytesRead < requestdBytes) {
...if you care, loop on read until
remaining bytes are fetched
or at EOF...
}
return(bytesRead);
> d) say "if you mount 'soft' and lose data, tough luck for you"
I seem to recall from my days at Sun, you should NOT use soft
mount for NFS writes at all. Soft mounts are for non-critical
disk resources. (Solaris admin manual?)
--
Doug Royer | http://INET-Consulting.com
-------------------------------|-----------------------------
We Do Standards - You Need Standards