Ian Lance Taylor <ian@xxxxxxxx> writes: > I couldn't think of any dynamic test which ran quickly. Note that the > autoconf test takes a few seconds. Here's an idea. Create a pipe, but close the read side. Let the write side be file descriptor W. Write to W. This will give you a SIGPIPE signal. In the SIGPIPE handler, use dup2 to cause W to point to /dev/null instead of to the pipe's write side. If system calls are restarted, the write will succeed; if not, it'll fail with errno set to SIGINT. > How about something like this: Thanks. I added a few more details and installed the following: 2003-09-07 Paul Eggert <eggert@xxxxxxxxxxx> * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Improve the accuracy of the wording about obsolescence. From a suggestion by Ian Lance Taylor in <http://mail.gnu.org/archive/html/autoconf/2003-09/msg00044.html>. Index: specific.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/specific.m4,v retrieving revision 1.355 retrieving revision 1.356 diff -p -u -r1.355 -r1.356 --- specific.m4 22 May 2003 13:24:07 -0000 1.355 +++ specific.m4 8 Sep 2003 00:55:50 -0000 1.356 @@ -252,9 +252,10 @@ fi # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'. AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS], [AC_DIAGNOSE([obsolete], -[$0: System call restartability is now typically set at runtime. -Remove this `AC_SYS_RESTARTABLE_SYSCALLS' -and adjust your code to use `sigaction' with `SA_RESTART' instead.])dnl +[$0: AC_SYS_RESTARTABLE_SYSCALLS is useful only when supporting very +old systems that lack `sigaction' and `SA_RESTART'. Don't bother with +this macro unless you need to support very old systems like 4.2BSD and +SVR3.])dnl AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl AC_CHECK_HEADERS(unistd.h) AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls,