From 585314e84c1a2e8941309874088963985e063213 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 22 Sep 2012 12:50:27 -0400 Subject: journalctl: reset cached column count on SIGWINCH This requires a little bit of tip-toeing around to explicitly avoid touching the environment from a sig handler. Instead, simply create a function to reset the var to its "unset" state, allowing the next call to columns() to recalculate and cache the new value. --- src/journal/journalctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/journal') diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 6b580d4307..e491c27662 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -175,6 +176,7 @@ static int parse_argv(int argc, char *argv[]) { case 'f': arg_follow = true; + signal(SIGWINCH, columns_cache_reset); break; case 'o': -- cgit v1.2.3-54-g00ecf