diff mbox

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

Message ID 20181009162905.27424-2-jjk@jjacky.com
State Accepted, archived
Delegated to: Andrew Gregory
Headers show

Commit Message

Olivier Brunel Oct. 9, 2018, 4:29 p.m. UTC
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@jjacky.com>
---
 lib/libalpm/dload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Gregory Oct. 17, 2018, 9:17 a.m. UTC | #1
On 10/09/18 at 06:29pm, Olivier Brunel wrote:
> 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@jjacky.com>
> ---

ACK.
diff mbox

Patch

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);
 	}