Define SA_RESTART also for mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jun 2008 19:54:08 +0000 (21:54 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jun 2008 19:54:08 +0000 (21:54 +0200)
ChangeLog
lib/sigaction.c
lib/signal.in.h

index c4ad9767abf8acb958e6bc8c0c31055b240a0441..8eab9171132878fc48068cfdd36691cded83a1f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-06-22  Bruno Haible  <bruno@clisp.org>
 
+       * lib/signal.in.h (SA_RESTART): New macro.
+       * lib/sigaction.c: Update comment.
+
        * m4/sigaction.m4 (gl_SIGACTION): Require gl_SIGNAL_H_DEFAULTS.
 
        * m4/signalblocking.m4 (gl_PREREQ_SIG_HANDLER_H): New macro.
index 9b0c92fdae8f74683bfa2c3538f68f62c3726d6f..1bad8092f2795077329db8ed282fbcfca6872805 100644 (file)
    the situation by reading static storage in a signal handler, which
    POSIX warns is not generically async-signal-safe.  Oh well.
 
-   Additionally, SIGCHLD is not defined, so we don't implement
-   SA_NOCLDSTOP or SA_NOCLDWAIT; sigaltstack() is not present, so we
-   don't implement SA_ONSTACK; and siginterrupt() is not present, so
-   we don't implement SA_RESTART.  Supporting SA_SIGINFO is impossible
-   to do portably.
+   Additionally:
+     - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD
+       is not defined.
+     - We don't implement SA_ONSTACK, because sigaltstack() is not present.
+     - We ignore SA_RESTART, because blocking Win32 calls are not interrupted
+       anyway when an asynchronous signal occurs, and the MSVCRT runtime
+       never sets errno to EINTR.
+     - We don't implement SA_SIGINFO because it is impossible to do so
+       portably.
 
    POSIX states that an application should not mix signal() and
    sigaction().  We support the use of signal() within the gnulib
index f0551380cdb9b263973200e0fa78213d584f9284..a1c9e6f6d38dcc84639631d3d8371dad9fbb887e 100644 (file)
@@ -142,6 +142,7 @@ struct sigaction
 /* Unsupported flags are not present.  */
 # define SA_RESETHAND 1
 # define SA_NODEFER 2
+# define SA_RESTART 4
 
 extern int sigaction (int, const struct sigaction *restrict,
                       struct sigaction *restrict);