[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_SYS_RESTARTABLE_SYSCALLS
From: |
Johan Danielsson |
Subject: |
Re: AC_SYS_RESTARTABLE_SYSCALLS |
Date: |
02 Oct 2001 14:39:11 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 |
David Oleszkiewicz <address@hidden> writes:
> AC_SYS_RESTARTABLE_SYSCALLS
> If the system automatically restarts a system call that is interrupted
> by a signal, define HAVE_RESTARTABLE_SYSCALLS.
[...]
> which would seem to indicate that if the system automatically does not
> restart system calls but rather wait() returns -1 (and presumably sets
> errno to ERESTARTSYS or EINTR) the test would exit successfully meaning
> no_default_restartable_syscall.
Is there a difference in the documented behaviour, and your
description of the same? The keyword here is "automatically".
> This result having no indication of whether the system is _able_ to
> support automatically restarting system calls.
The test does not claim to do that either.
> what am i missing.
That it's documented in the "Obsolete Macros" section (at least in
Autoconf 2.52):
- Macro: AC_SYS_RESTARTABLE_SYSCALLS
If the system automatically restarts a system call that is
interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'. This
macro does not check if system calls are restarted in general-it
tests whether a signal handler installed with `signal' (but not
`sigaction') causes system calls to be restarted. It does not test
if system calls can be restarted when interrupted by signals that
have no handler.
These days portable programs should use `sigaction' with
`SA_RESTART' if they want restartable system calls. They should
not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays whether a
system call is restartable is a dynamic issue, not a
configuration-time issue.
/Johan