diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2015-11-30 19:07:11 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-12-05 09:10:23 +0100 |
commit | b8a72770619a29db436e2a3883ebe03910a8e827 (patch) | |
tree | 5e833b504c6b3a61637fbf770853027c2d29c541 /src/pacman/pacman.c | |
parent | 8089081ef962337d9ff445213cdb160fc47da7c8 (diff) | |
download | pacman-b8a72770619a29db436e2a3883ebe03910a8e827.tar.gz pacman-b8a72770619a29db436e2a3883ebe03910a8e827.tar.xz |
extract soft interrupt handlers
Delays handler setup until after config is set to a valid
value to avoid a segmentation fault.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r-- | src/pacman/pacman.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 6a0eb97d..4237b4d4 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1092,7 +1092,6 @@ int main(int argc, char *argv[]) uid_t myuid = getuid(); install_segv_handler(); - install_signal_handlers(); /* i18n init */ #if defined(ENABLE_NLS) @@ -1108,6 +1107,8 @@ int main(int argc, char *argv[]) cleanup(1); } + install_soft_interrupt_handler(); + if(!isatty(fileno(stdout))) { /* disable progressbar if the output is redirected */ config->noprogressbar = 1; |