X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2Flib_tstp.c;fp=ncurses%2Ftty%2Flib_tstp.c;h=dd925c7efd12b16045644b4e324bedb97798496b;hp=f228f72be84dcb08075cd4bd43d2f9b03b41010b;hb=a0914678507b8ee1d1a0440625235fd7b48964bc;hpb=38e60f5f7931446480f1a7ca707c370ec365ba47 diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index f228f72b..dd925c7e 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_tstp.c,v 1.53 2022/10/15 13:09:05 Mikhail.Korolev Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.54 2022/12/24 22:22:10 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -287,6 +287,7 @@ handle_SIGINT(int sig) NCURSES_EXPORT(void) _nc_set_read_thread(bool enable) { + _nc_lock_global(curses); if (enable) { # if USE_WEAK_SYMBOLS if ((pthread_self) && (pthread_kill) && (pthread_equal)) @@ -295,6 +296,7 @@ _nc_set_read_thread(bool enable) } else { _nc_globals.read_thread = 0; } + _nc_unlock_global(curses); } # endif