diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-08-28T19·48+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28T19·48+0200 |
commit | 7ef2645f45abdd35f88d7760a3e9f13a872fcb11 (patch) | |
tree | 31a5d2b64d0aab65b8e38c953adfef446f40f314 /src | |
parent | 7298a38a07d62d2077ca30a3ff619e32edb4eb1e (diff) | |
parent | 5011a52cf3f291c22d784aff6f5bbf8b99ae186a (diff) |
Merge pull request #2921 from matthewbauer/handle-sigwinch
Handle SIGWINCH in main thread
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/shared.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index cd752f4678a0..0afddfb785dd 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -125,6 +125,15 @@ void initNix() act.sa_handler = sigHandler; if (sigaction(SIGUSR1, &act, 0)) throw SysError("handling SIGUSR1"); +#if __APPLE__ + /* HACK: on darwin, we need can’t use sigprocmask with SIGWINCH. + * Instead, add a dummy sigaction handler, and signalHandlerThread + * can handle the rest. */ + struct sigaction sa; + sa.sa_handler = sigHandler; + if (sigaction(SIGWINCH, &sa, 0)) throw SysError("handling SIGWINCH"); +#endif + /* Register a SIGSEGV handler to detect stack overflows. */ detectStackOverflow(); |