set SIGWINCH handler before initializing ncurses to avoid races

master
Andrzej Rybczak 11 years ago
parent bb4c0a9d4c
commit 5a3a2fbbf1
  1. 1
      NEWS
  2. 14
      src/ncmpcpp.cpp

@ -2,6 +2,7 @@ ncmpcpp-0.6.4 (????-??-??)
* Fix title of a pop-up which shows during adding selected items to the current playlist.
* Correctly deal with leading separator while parsing filenames in tag editor.
* Fix initial incorrect window size that was occuring in some cases.
ncmpcpp-0.6.3 (2015-03-02)

@ -111,6 +111,13 @@ int main(int argc, char **argv)
cerr_buffer = std::cerr.rdbuf();
std::cerr.rdbuf(errorlog.rdbuf());
# ifndef WIN32
signal(SIGPIPE, sighandler);
signal(SIGWINCH, sighandler);
// ignore Ctrl-C
sigignore(SIGINT);
# endif // !WIN32
NC::initScreen("ncmpcpp ver. " VERSION, Config.colors_enabled);
Actions::OriginalStatusbarVisibility = Config.statusbar_visibility;
@ -146,13 +153,6 @@ int main(int argc, char **argv)
if (Config.mouse_support)
mousemask(ALL_MOUSE_EVENTS, 0);
# ifndef WIN32
signal(SIGPIPE, sighandler);
signal(SIGWINCH, sighandler);
// ignore Ctrl-C
sigignore(SIGINT);
# endif // !WIN32
while (!Actions::ExitMainLoop)
{
try

Loading…
Cancel
Save