diff options
author | Timo Teräs <timo.teras@iki.fi> | 2022-12-22 15:12:01 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2022-12-22 15:12:01 +0200 |
commit | b75ffff1551cf100e879e5aca3404b947a540581 (patch) | |
tree | 06b7d061c2404af4497c02b495b8dc37b85c57a5 /src | |
parent | 101c8684ac7e924bf9097e8cff4c88e3f0eb7923 (diff) | |
download | apk-tools-b75ffff1551cf100e879e5aca3404b947a540581.tar.gz apk-tools-b75ffff1551cf100e879e5aca3404b947a540581.tar.bz2 apk-tools-b75ffff1551cf100e879e5aca3404b947a540581.tar.xz apk-tools-b75ffff1551cf100e879e5aca3404b947a540581.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/apk.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |