diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-01-18 12:59:33 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-01-18 12:59:33 -0500 |
commit | 62928ddf80fea0291cf40d95877bb5b6f9d110c9 (patch) | |
tree | 1db1689d2e145fa5957717cb62133d4a24b0171e /src/sighook.h | |
parent | 41f3283ec38e0cc27e350569bef3651e16447ce0 (diff) | |
download | bfs-62928ddf80fea0291cf40d95877bb5b6f9d110c9.tar.xz |
sighook: New sigreset() function to reset all handlers
Diffstat (limited to 'src/sighook.h')
-rw-r--r-- | src/sighook.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |