[pacman-dev] [PATCH] alpm: Do not raise SIGINT when filesize goes over limit

Olivier Brunel jjk at jjacky.com
Tue Oct 9 16:29:05 UTC 2018


Variable dload_interrupted is used both to abort a download because
SIGINT was caught, and when a file limit is reached. But raising SIGINT
is only meant to happen in the first case.

Signed-off-by: Olivier Brunel <jjk at jjacky.com>
---
 lib/libalpm/dload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 0a3293cf..c70554b8 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -586,7 +586,7 @@ cleanup:
 	unmask_signal(SIGINT, &orig_sig_int);
 	unmask_signal(SIGPIPE, &orig_sig_pipe);
 	/* if we were interrupted, trip the old handler */
-	if(dload_interrupted) {
+	if(dload_interrupted == ABORT_SIGINT) {
 		raise(SIGINT);
 	}
 
-- 
2.19.0


More information about the pacman-dev mailing list