From b75ffff1551cf100e879e5aca3404b947a540581 Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Thu, 22 Dec 2022 15:12:01 +0200 Subject: apk: ignore SIGINT after applet is executed apk_db_close is not re-entrant, and would be executed by the signal handler. It makes sense to just ignore the signal after applet is complete as the clean up work has been started already. fixes #10840 --- src/apk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/apk.c b/src/apk.c index 94520c1..0c8286c 100644 --- a/src/apk.c +++ b/src/apk.c @@ -557,6 +557,7 @@ int main(int argc, char **argv) memcpy(args->item, argv, argc * sizeof(*argv)); r = applet->main(ctx, &db, args); + signal(SIGINT, SIG_IGN); apk_db_close(&db); #ifdef TEST_MODE -- cgit v1.2.3-60-g2f50