diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2010-06-02 17:46:58 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2010-06-02 17:46:58 +0300 |
commit | e89d987056cee7d4e279be3ef3a6cc690bfc0e6d (patch) | |
tree | 9ba62569050e65612d704eb964156e75941277c2 | |
parent | xz man page updates. (diff) | |
download | xz-e89d987056cee7d4e279be3ef3a6cc690bfc0e6d.tar.xz |
Adjust SA_RESTART workaround.
I want to get a bug report if something else than
DJGPP lacks SA_RESTART.
-rw-r--r-- | src/xz/message.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/xz/message.c b/src/xz/message.c index 19734e5b..ad93573a 100644 --- a/src/xz/message.c +++ b/src/xz/message.c @@ -142,19 +142,19 @@ message_init(void) */ #ifdef SIGALRM - // At least DJGPP lacks SA_RESTART. It's not essential for us (the - // rest of the code can handle interrupted system calls), so just - // define it zero. -# ifndef SA_RESTART + // DJGPP lacks SA_RESTART, but it shouldn't give EINTR + // in most places either. +# if defined(__DJGPP__) && !defined(SA_RESTART) # define SA_RESTART 0 # endif + // Establish the signal handlers which set a flag to tell us that // progress info should be updated. Since these signals don't - // require any quick action, we set SA_RESTART. + // require any quick action, we set SA_RESTART. That way we don't + // need to block them either in signals_block() to keep stdio + // functions from getting EINTR. static const int sigs[] = { -#ifdef SIGALRM SIGALRM, -#endif #ifdef SIGINFO SIGINFO, #endif |