diff options
author | 2018-08-28 17:15:12 +0200 | |
---|---|---|
committer | 2018-08-28 17:35:24 +0200 | |
commit | a02a1627a954432cc65ec981cada8ba420d7ad2f (patch) | |
tree | 3111ce06668dc15d23b26500934ba5bf65341771 /src/sig-monitor.h | |
parent | 5dd7df31306b95a3fafe6d3238d4553107a6c70f (diff) |
Allow choice to trap or not program faults
The binder traps faults by default to recover as much as
possible from unexpected errors.
Developers may need to remove that behaviour to get core file.
This introduces 2 ways to set or remove the trapping of faults:
- the environment variable AFB_TRAP_FAULTS
- the command line option --trap-faults
Both take a boolean value set using on of the following words:
1 yes true on -- enable trapping of faults (the default)
0 no false off -- disable trapping of faults
Bug-AGL: SPEC-1702
Change-Id: I6c6a3b933dbda9922a6079c390a601c533d49e55
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/sig-monitor.h')
-rw-r--r-- | src/sig-monitor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sig-monitor.h b/src/sig-monitor.h index 9121ac8f..5fdac167 100644 --- a/src/sig-monitor.h +++ b/src/sig-monitor.h @@ -17,9 +17,11 @@ #pragma once -extern int sig_monitor_init(); +extern int sig_monitor_init(int enable); extern void sig_monitor_clean_timeouts(); extern int sig_monitor_init_timeouts(); +extern void sig_monitor_disable(); +extern int sig_monitor_enable(); extern void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg); |