mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Merge pull request #2921 from matthewbauer/handle-sigwinch
Handle SIGWINCH in main thread
This commit is contained in:
commit
7ef2645f45
1 changed files with 9 additions and 0 deletions
|
@ -125,6 +125,15 @@ void initNix()
|
||||||
act.sa_handler = sigHandler;
|
act.sa_handler = sigHandler;
|
||||||
if (sigaction(SIGUSR1, &act, 0)) throw SysError("handling SIGUSR1");
|
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. */
|
/* Register a SIGSEGV handler to detect stack overflows. */
|
||||||
detectStackOverflow();
|
detectStackOverflow();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue