From 62928ddf80fea0291cf40d95877bb5b6f9d110c9 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 18 Jan 2025 12:59:33 -0500 Subject: sighook: New sigreset() function to reset all handlers --- src/sighook.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sighook.h') diff --git a/src/sighook.h b/src/sighook.h index 87bba4e..7149229 100644 --- a/src/sighook.h +++ b/src/sighook.h @@ -72,4 +72,12 @@ struct sighook *atsigexit(sighook_fn *fn, void *arg); */ void sigunhook(struct sighook *hook); +/** + * Restore all signal handlers to their original dispositions (e.g. after fork()). + * + * @return + * 0 on success, -1 on failure. + */ +int sigreset(void); + #endif // BFS_SIGHOOK_H -- cgit v1.2.3