reinstall signal handler each time it's executed on Solaris (#3976)

This commit is contained in:
Andrzej Rybczak
2014-08-26 22:46:05 +02:00
parent 8e55acd3d0
commit 8db4b668ef

View File

@@ -56,16 +56,20 @@ namespace
bool run_resize_screen = false; bool run_resize_screen = false;
# if !defined(WIN32) # if !defined(WIN32)
void sighandler(int signal) void sighandler(int sig)
{ {
if (signal == SIGPIPE) if (sig == SIGPIPE)
{ {
Statusbar::msg("SIGPIPE (broken pipe signal) received"); Statusbar::msg("SIGPIPE (broken pipe signal) received");
} }
else if (signal == SIGWINCH) else if (sig == SIGWINCH)
{ {
run_resize_screen = true; run_resize_screen = true;
} }
# if defined(__sun) && defined(__SVR4)
// in solaris it is needed to reinstall the handler each time it's executed
signal(sig, sighandler);
# endif // __sun && __SVR4
} }
# endif // !WIN32 # endif // !WIN32