From c74495a3b217249e3a14d616b38367b6dbb006e4 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 12 Nov 2015 18:51:15 -0500 Subject: extract SIGWINCH handler Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- src/pacman/pacman.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pacman/pacman.c') diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 0f115c25..e1f90398 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1107,9 +1107,12 @@ int main(int argc, char *argv[]) cleanup(1); } - /* disable progressbar if the output is redirected */ if(!isatty(fileno(stdout))) { + /* disable progressbar if the output is redirected */ config->noprogressbar = 1; + } else { + /* install signal handler to update output width */ + install_winch_handler(); } /* Priority of options: -- cgit v1.2.3-24-g4f1b