Download raw body.
Bug: tog suspend/continue
Stefan Sperling: > Some debugging with bluhm revealed that ncurses uses SIGTSTP and this > signal should only be handled by the main thread. > > Is this better? -snip- Yes, with this I can no longer break the "log" or "blame" views with suspend/continue. > +static const struct got_error * > +block_signals_used_by_main_thread(void) > +{ > + sigset_t sigset; > + int errcode; > + > + if (sigemptyset(&sigset) == -1) > + return got_error_from_errno("sigemptyset"); > + > + /* tog handles SIGWINCH and SIGCONT */ > + if (sigaddset(&sigset, SIGWINCH) == -1) > + return got_error_from_errno("sigaddset"); > + if (sigaddset(&sigset, SIGCONT) == -1) > + return got_error_from_errno("sigaddset"); > + > + /* ncurses handles SIGTSTP */ > + if (sigaddset(&sigset, SIGTSTP) == -1) > + return got_error_from_errno("sigaddset"); > + > + errcode = pthread_sigmask(SIG_BLOCK, &sigset, NULL); > + if (errcode) > + return got_error_set_errno(errcode, "pthread_sigmask"); > + > + return NULL; > +} Makes sense. -- Christian "naddy" Weisgerber naddy@mips.inka.de
Bug: tog suspend/continue