]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/lib_tstp.c
ncurses 5.9 - patch 20110528
[ncurses.git] / ncurses / tty / lib_tstp.c
index 4a0ef50336362e3bb99b665e08ead49e7d47fa12..6ccdfc74a27f631db6244d408dcb8de351fa68f1 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2011 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            *
 
 #include <SigAction.h>
 
-#if SVR4_ACTION && !defined(_POSIX_SOURCE)
-#define _POSIX_SOURCE
-#endif
-
-MODULE_ID("$Id: lib_tstp.c,v 1.39 2009/05/09 15:46:20 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.42 2011/04/16 16:42:10 tom Exp $")
 
 #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
 #define USE_SIGTSTP 1
@@ -286,6 +282,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 */