autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_SYS_RESTARTABLE_SYSCALLS


From: Ian Lance Taylor
Subject: AC_SYS_RESTARTABLE_SYSCALLS
Date: 02 Sep 2003 22:07:53 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

What is the logic behind obsoleting AC_SYS_RESTARTABLE_SYSCALLS in
current versions of autoconf?  I searched the mailing lists at
gnu.org, but couldn't find anything obvious, although I didn't check
every message the search returned.

The point of AC_SYS_RESTARTABLE_SYSCALLS is to see whether the system
restarts system calls on systems which do not support sigaction.  If
sigaction is supported, then there is no need to use this macro,
because POSIX.1 clearly specifies how sigaction behaves (system calls
are interrupted by signals).  On systems without sigaction, however,
some restart `slow' system calls (e.g., BSD4.2) and some do not (e.g.,
SVR3), and there is no way to change this behaviour.

For certain types of code, it is essential to know the difference.  I
added the macro to autoconf in the first place because I needed the
information in order to write the UUCP serial line handling code.
Specifically, on systems where a read from a serial line is restarted
on a signal, a SIGALRM handler must call setjmp.

The manual, and the program, suggest using sigaction with SA_RESTART.
This is obviously useless.  Firstly not every system supports
SA_RESTART, but, more importantly, the whole point
AC_SYS_RESTARTABLE_SYSCALLS is for systems which do not provide
sigaction.

autoconf is, after all, intended to work for older systems.  If I can
assume a modern system, such as one which supports sigaction with
SA_RESTART, then autoconf can be replaced with simpler mechanisms.

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]