Make run_resize_screen volatile
This commit is contained in:
@@ -50,18 +50,17 @@
|
|||||||
|
|
||||||
namespace ph = std::placeholders;
|
namespace ph = std::placeholders;
|
||||||
|
|
||||||
namespace
|
namespace {
|
||||||
{
|
|
||||||
std::ofstream errorlog;
|
std::ofstream errorlog;
|
||||||
std::streambuf *cerr_buffer;
|
std::streambuf *cerr_buffer;
|
||||||
bool run_resize_screen = false;
|
|
||||||
|
volatile bool run_resize_screen = false;
|
||||||
|
|
||||||
void sighandler(int sig)
|
void sighandler(int sig)
|
||||||
{
|
{
|
||||||
if (sig == SIGWINCH)
|
if (sig == SIGWINCH)
|
||||||
{
|
|
||||||
run_resize_screen = true;
|
run_resize_screen = true;
|
||||||
}
|
|
||||||
#if defined(__sun) && defined(__SVR4)
|
#if defined(__sun) && defined(__SVR4)
|
||||||
// in solaris it is needed to reinstall the handler each time it's executed
|
// in solaris it is needed to reinstall the handler each time it's executed
|
||||||
signal(sig, sighandler);
|
signal(sig, sighandler);
|
||||||
@@ -77,6 +76,7 @@ namespace
|
|||||||
NC::destroyScreen();
|
NC::destroyScreen();
|
||||||
windowTitle("");
|
windowTitle("");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user