** The use of the long-deprecated name 'configure.in' for the autoconf
input file now elicits a warning in the 'obsolete' category.
-** MACROS
+** Macros
- New macro AC_PROG_CC_C11.
- AC_PROG_CC_STDC now prefers C11 if available, falling back on C99
and then on C89 as before.
+- AC_FUNC_VFORK now checks for the signal-handling bug in Solaris 2.4 'vfork'.
+ Formerly, it ignored this bug, so that Emacs could use some tricky
+ code on that platform. Solaris 2.4 has not been supported since
+ 2003 and nowadays it's better to omit that old trick.
+
* Noteworthy changes in release 2.69 (2012-04-24) [stable]
** Autoconf now requires perl 5.6 or better (but generated configure
define @code{vfork} to be @code{fork} for backward compatibility with
previous versions of @command{autoconf}. This macro checks for several known
errors in implementations of @code{vfork} and considers the system to not
-have a working @code{vfork} if it detects any of them. It is not considered
-to be an implementation error if a child's invocation of @code{signal}
-modifies the parent's signal handler, since child processes rarely change
-their signal handlers.
+have a working @code{vfork} if it detects any of them.
Since this macro defines @code{vfork} only for backward compatibility with
previous versions of @command{autoconf} you're encouraged to define it
[AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Thanks to Paul Eggert for this test. */
]AC_INCLUDES_DEFAULT[
+#include <signal.h>
#include <sys/wait.h>
#ifdef HAVE_VFORK_H
# include <vfork.h>
#endif
+
+static void
+do_nothing (int sig)
+{
+ (void) sig;
+}
+
/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent. The compiler
is told about this with #include <vfork.h>, but some compilers
static variable whose address is put into a register that is
clobbered by the vfork. */
static void
-#ifdef __cplusplus
sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
{
static pid_t child;
if (!child) {
sparc_address_test (0);
+ /* On Solaris 2.4, changes by the child to the signal handler
+ also munge signal handlers in the parent. To detect this,
+ start by putting the parent's handler in a known state. */
+ signal (SIGTERM, SIG_DFL);
+
child = vfork ();
if (child == 0) {
|| p != p5 || p != p6 || p != p7)
_exit(1);
+ /* Alter the child's signal handler. */
+ if (signal (SIGTERM, do_nothing) != SIG_DFL)
+ _exit(1);
+
/* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
from child file descriptors. If the child closes a descriptor
before it execs or exits, this munges the parent's descriptor
/* Was there some problem with vforking? */
child < 0
+ /* Did the child munge the parent's signal handler? */
+ || signal (SIGTERM, SIG_DFL) != SIG_DFL
+
/* Did the child fail? (This shouldn't happen.) */
|| status