Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
2c0d617
)
debug: allow break after wait
author
José Bollo
<jose.bollo@iot.bzh>
Fri, 28 Jul 2017 07:54:20 +0000
(09:54 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Fri, 28 Jul 2017 07:54:20 +0000
(09:54 +0200)
Change-Id: I634abe531606a30ba241c85bf650589c5f0ea4ca
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-debug.c
patch
|
blob
|
history
diff --git
a/src/afb-debug.c
b/src/afb-debug.c
index
228f710
..
e7a5c64
100644
(file)
--- a/
src/afb-debug.c
+++ b/
src/afb-debug.c
@@
-82,15
+82,7
@@
void afb_debug(const char *key)
struct sigaction sa, psa;
sigset_t ss, oss;
struct sigaction sa, psa;
sigset_t ss, oss;
- if (has_key(key, secure_getenv(key_env_break))) {
- NOTICE("DEBUG BREAK before %s", key);
- memset(&sa, 0, sizeof sa);
- sa.sa_handler = handler;
- sigaction(SIGINT, &sa, &psa);
- raise(SIGINT);
- sigaction(SIGINT, &psa, NULL);
- NOTICE("DEBUG BREAK after %s", key);
- } else if (has_key(key, secure_getenv(key_env_wait))) {
+ if (has_key(key, secure_getenv(key_env_wait))) {
NOTICE("DEBUG WAIT before %s", key);
sigfillset(&ss);
sigdelset(&ss, SIGINT);
NOTICE("DEBUG WAIT before %s", key);
sigfillset(&ss);
sigdelset(&ss, SIGINT);
@@
-107,6
+99,15
@@
void afb_debug(const char *key)
sigprocmask(SIG_SETMASK, &oss, NULL);
NOTICE("DEBUG WAIT after %s", key);
}
sigprocmask(SIG_SETMASK, &oss, NULL);
NOTICE("DEBUG WAIT after %s", key);
}
+ if (has_key(key, secure_getenv(key_env_break))) {
+ NOTICE("DEBUG BREAK before %s", key);
+ memset(&sa, 0, sizeof sa);
+ sa.sa_handler = handler;
+ sigaction(SIGINT, &sa, &psa);
+ raise(SIGINT);
+ sigaction(SIGINT, &psa, NULL);
+ NOTICE("DEBUG BREAK after %s", key);
+ }
}
#endif
}
#endif