database: use SA_RESETHAND instead of SA_ONESHOT when registering a SIGALRM handler

SA_ONESHOT is a GNU-specific alias for POSIX SA_RESETHAND.
cute-signatures
Ariadne Conill 2021-12-27 14:30:27 -06:00 committed by Timo Teräs
parent 0b1b090f02
commit 8d5784aaf5
1 changed files with 1 additions and 1 deletions

View File

@ -1554,7 +1554,7 @@ int apk_db_open(struct apk_database *db, struct apk_ctx *ac)
apk_msg(out, "Waiting for repository lock");
memset(&sa, 0, sizeof sa);
sa.sa_handler = handle_alarm;
sa.sa_flags = SA_ONESHOT;
sa.sa_flags = SA_RESETHAND;
sigaction(SIGALRM, &sa, &old_sa);
alarm(ac->lock_wait);