bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recursive call to _nc_sigprocmask during signal handling, non-threaded


From: Rich Coe
Subject: recursive call to _nc_sigprocmask during signal handling, non-threaded
Date: Sat, 3 Sep 2016 17:40:02 -0500

I found this error in ncurses-6.0 but also exists in 5.9.  
I don't know when this was introduced.  

There is a macro that defines sigprocmask() as _nc_sigprocmask(), but
_nc_sigprocmask() tries to call the system version of sigprocmask, without
first undef'ing the macro.  This leads to the program to loop indefinitely.

This probably isn't the best solution, as some systems might define the 
system version of sigprocmask as a macro.

--- ncurses-6.0/ncurses/tinfo/lib_data.c        2010-05-15 17:06:56.000000000 
-0500
+++ ncurses-6.0/ncurses/tinfo/lib_data.c        2016-09-03 11:39:07.885069978 
-0500
@@ -362,6 +371,7 @@ _nc_sigprocmask(int how, const sigset_t
     if ((pthread_sigmask))
        return pthread_sigmask(how, newmask, oldmask);
     else
+#undef sigprocmask
        return sigprocmask(how, newmask, oldmask);
 }
 #endif

-- 
Rich Coe <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]