[pacman-dev] [PATCH] alpm: Fix SIGINT handling re: aborting download

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


Upon receiving SIGINT a flag is set to abort the (curl) download.
However, since it was never reset/initialized, if a front-end doesn't
actually exit on SIGINT, and later tries any operation that needs to
perform a new download, said download would always get aborted right
away due to the flag not having been reset.

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

diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index cca39470..0a3293cf 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -253,6 +253,7 @@ static void curl_set_handle_opts(struct dload_payload *payload,
 	const char *useragent = getenv("HTTP_USER_AGENT");
 	struct stat st;
 
+	dload_interrupted = 0;
 	/* the curl_easy handle is initialized with the alpm handle, so we only need
 	 * to reset the handle's parameters for each time it's used. */
 	curl_easy_reset(curl);
-- 
2.19.0


More information about the pacman-dev mailing list