X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftty%2Flib_tstp.c;h=70f805a2ad5e6fa16b5293cbc0d349e62d92a3cc;hp=4e7c53c18d2bf41855670da99b6eda3c6be1e757;hb=41677b308e138027b7e435f741ee7fe5651237b0;hpb=7a6bbc8cf41c5186d46accc3d08622dc86526b34 diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index 4e7c53c1..70f805a2 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -46,7 +46,7 @@ #define _POSIX_SOURCE #endif -MODULE_ID("$Id: lib_tstp.c,v 1.38 2009/04/18 19:36:11 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.41 2010/05/15 21:31:12 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -269,7 +269,7 @@ cleanup(int sig) if (scan->_ofp != 0 && isatty(fileno(scan->_ofp))) { scan->_cleanup = TRUE; - scan->_outch = _nc_outch; + scan->_outch = NCURSES_SP_NAME(_nc_outch); } set_term(scan); NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG); @@ -286,6 +286,13 @@ static void sigwinch(int sig GCC_UNUSED) { _nc_globals.have_sigwinch = 1; +# if USE_PTHREADS_EINTR + if (_nc_globals.read_thread) { + if (!pthread_equal(pthread_self(), _nc_globals.read_thread)) + pthread_kill(_nc_globals.read_thread, SIGWINCH); + _nc_globals.read_thread = 0; + } +# endif } #endif /* USE_SIGWINCH */