X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftty%2Flib_tstp.c;h=ec086ca730c8dce69ec4b845d6f62ef0d0cf2cb4;hb=1c305869cc1b9454efa9325fb5a44b18c79ce91b;hp=a20e72a9d96b159e82356af7845bb23744b5aa35;hpb=768f77851c2350c02252b8e0e5d69fc435940b83;p=ncurses.git diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index a20e72a9..ec086ca7 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 2020-2021,2022 Thomas E. Dickey * * Copyright 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: lib_tstp.c,v 1.51 2021/09/04 10:54:35 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.52 2022/08/13 14:36:43 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -284,6 +284,22 @@ handle_SIGINT(int sig) } #if USE_SIGWINCH + +# ifndef _nc_set_read_thread +NCURSES_EXPORT(void) +_nc_set_read_thread(bool enable) +{ + if (enable) { +# if USE_WEAK_SYMBOLS + if ((pthread_self) && (pthread_kill) && (pthread_equal)) +# endif + _nc_globals.read_thread = pthread_self(); + } else { + _nc_globals.read_thread = 0; + } +} +# endif + static void handle_SIGWINCH(int sig GCC_UNUSED) {