Re: EINTR error in SunOS

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: EINTR error in SunOS
Дата
Msg-id 878xtzcu4g.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на Re: EINTR error in SunOS  (Doug Royer <Doug@Royer.com>)
Ответы Re: EINTR error in SunOS  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: EINTR error in SunOS  (Doug Royer <Doug@Royer.com>)
Список pgsql-hackers
Doug Royer <Doug@Royer.com> writes:

>  From the Linux 'nfs' man page:
>
>   intr           If  an  NFS file operation has a major timeout and it is
>                  hard mounted, then allow signals to  interupt  the  file
>                  operation  and  cause  it to return EINTR to the calling
>                  program.  The default is to not allow file operations to
>                  be interrupted.
>
> Solaris 'mount_nfs' man page
>
>   intr | nointr
>                  Allow (do not allow) keyboard interrupts to kill
>                  a  process  that  is  hung  while  waiting for a
>                  response on  a  hard-mounted  file  system.  The
>                  default  is  intr,  which  makes it possible for
>                  clients to interrupt applications  that  may  be
>                  waiting for a remote mount.
>
> The Solaris and Linux defaults seem to be the opposite of each other.

Actually they're the same, though differently worded.  "Major timeout"
means the server has not responded for N milliseconds, not that the
client has decided to time out the request.  If 'hard' is set, the
client will keep trying indefinitely, though you can interrupt it if
you've specified 'intr'.

> So I think we are saying the same thing.
>
> You can get EINTR with hard+intr mounts.

Yes, *only* if the user specifically decides to send a signal, or if
it uses SIGALRM or whatever.  I agree that if you expect 'intr' to be
used, your code needs to handle EINTR.

> I am not sure what you get with soft mounts on a timeout.

The Linux manpage implies you get EIO.

-Doug


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] default resource limits
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: EINTR error in SunOS