Re: EINTR error in SunOS
От | Greg Stark |
---|---|
Тема | Re: EINTR error in SunOS |
Дата | |
Msg-id | 8764p593vc.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Re: EINTR error in SunOS (Qingqing Zhou <zhouqq@cs.toronto.edu>) |
Ответы |
Re: EINTR error in SunOS
|
Список | pgsql-hackers |
Qingqing Zhou <zhouqq@cs.toronto.edu> writes: > On Fri, 30 Dec 2005, Tom Lane wrote: > > > > I've heard of this in connection with NFS ... is your DB on an NFS > > filesystem by any chance? > > I have patched IO routines in backend/storage that POSIX says EINTR is > possible except unlink(). Though POSIX says EINTR is not possible, during > many regressions, I found it sometimes sets this errno on NFS (I still > don't know where is the smoking-gun): Well there is a reason intr is not the default for NFS mounts. It's precisely because it breaks the traditional unix filesystem interface. Syscalls that historically are not interruptible become interruptible and not all programs behave properly when that occurs. In any case POSIX explicitly allows functions to return other errors aside from those specified as long as it's for error conditions not listed. [Chapter 2 Section 3, paragraph 6] Implementations may support additional errors not included in this list, may generate errors included in this list undercircumstances other than those described here, or may contain extensions or limitations that prevent some errors fromoccurring. The ERRORS section on each reference page specifies whether an error shall be returned, or whether it maybe returned. Implementations shall not generate a different error number from the ones described here for error conditionsdescribed in this volume of IEEE Std 1003.1-2001, but may generate additional errors unless explicitly disallowedfor a particular function Ironically EINTR *is* singled out to be specifically forbidden to be returned from some system calls but only those in the Threads option which are mostly pthread* functions. unlink isn't covered by that prohibition. -- greg
В списке pgsql-hackers по дате отправления: