Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Avoid lock when child dies
[src/app-framework-binder.git]
/
src
/
sig-monitor.c
diff --git
a/src/sig-monitor.c
b/src/sig-monitor.c
index
954dcf8
..
7059281
100644
(file)
--- a/
src/sig-monitor.c
+++ b/
src/sig-monitor.c
@@
-22,33
+22,33
@@
*******************************************************************************/
/* controls whether to dump stack or not */
*******************************************************************************/
/* controls whether to dump stack or not */
-#if !defined(
USE
_SIG_MONITOR_DUMPSTACK)
-# define
USE
_SIG_MONITOR_DUMPSTACK 1
+#if !defined(
WITH
_SIG_MONITOR_DUMPSTACK)
+# define
WITH
_SIG_MONITOR_DUMPSTACK 1
#endif
/* control whether to monitor signals */
#endif
/* control whether to monitor signals */
-#if !defined(
USE
_SIG_MONITOR_SIGNALS)
-# define
USE
_SIG_MONITOR_SIGNALS 1
+#if !defined(
WITH
_SIG_MONITOR_SIGNALS)
+# define
WITH
_SIG_MONITOR_SIGNALS 1
#endif
/* controls whether to monitor calls */
#endif
/* controls whether to monitor calls */
-#if !defined(
USE
_SIG_MONITOR_FOR_CALL)
-# define
USE
_SIG_MONITOR_FOR_CALL 1
+#if !defined(
WITH
_SIG_MONITOR_FOR_CALL)
+# define
WITH
_SIG_MONITOR_FOR_CALL 1
#endif
/* control whether to monitor timers */
#endif
/* control whether to monitor timers */
-#if !defined(
USE
_SIG_MONITOR_TIMERS)
-# define
USE
_SIG_MONITOR_TIMERS 1
+#if !defined(
WITH
_SIG_MONITOR_TIMERS)
+# define
WITH
_SIG_MONITOR_TIMERS 1
#endif
#endif
-#if !
USE
_SIG_MONITOR_SIGNALS
-# undef
USE
_SIG_MONITOR_FOR_CALL
-# define
USE
_SIG_MONITOR_FOR_CALL 0
+#if !
WITH
_SIG_MONITOR_SIGNALS
+# undef
WITH
_SIG_MONITOR_FOR_CALL
+# define
WITH
_SIG_MONITOR_FOR_CALL 0
#endif
#endif
-#if !
USE
_SIG_MONITOR_FOR_CALL
-# undef
USE
_SIG_MONITOR_TIMERS
-# define
USE
_SIG_MONITOR_TIMERS 0
+#if !
WITH
_SIG_MONITOR_FOR_CALL
+# undef
WITH
_SIG_MONITOR_TIMERS
+# define
WITH
_SIG_MONITOR_TIMERS 0
#endif
/******************************************************************************/
#endif
/******************************************************************************/
@@
-63,7
+63,7
@@
#include "verbose.h"
/******************************************************************************/
#include "verbose.h"
/******************************************************************************/
-#if !
USE
_SIG_MONITOR_DUMPSTACK
+#if !
WITH
_SIG_MONITOR_DUMPSTACK
static inline void dumpstack(int crop, int signum) {}
static inline void dumpstack(int crop, int signum) {}
@@
-109,7
+109,7
@@
static void dumpstack(int crop, int signum)
#endif
/******************************************************************************/
#endif
/******************************************************************************/
-#if !
USE
_SIG_MONITOR_TIMERS
+#if !
WITH
_SIG_MONITOR_TIMERS
static inline int timeout_create() { return 0; }
static inline int timeout_arm(int timeout) { return 0; }
static inline int timeout_create() { return 0; }
static inline int timeout_arm(int timeout) { return 0; }
@@
-154,7
+154,7
@@
static inline int timeout_create()
rc = timer_create(CLOCK_THREAD_CPUTIME_ID, &sevp, &thread_timerid);
thread_timer_set = !rc;
}
rc = timer_create(CLOCK_THREAD_CPUTIME_ID, &sevp, &thread_timerid);
thread_timer_set = !rc;
}
- return
0
;
+ return
rc
;
}
/*
}
/*
@@
-198,7
+198,7
@@
static inline void timeout_delete()
}
#endif
/******************************************************************************/
}
#endif
/******************************************************************************/
-#if !
USE
_SIG_MONITOR_FOR_CALL
+#if !
WITH
_SIG_MONITOR_FOR_CALL
static inline void monitor_raise(int signum) {}
static inline void monitor_raise(int signum) {}
@@
-240,7
+240,7
@@
static inline void monitor_raise(int signum)
}
#endif
/******************************************************************************/
}
#endif
/******************************************************************************/
-#if !
USE
_SIG_MONITOR_SIGNALS
+#if !
WITH
_SIG_MONITOR_SIGNALS
static inline int enable_signal_handling() { return 0; }
static inline int enable_signal_handling() { return 0; }
@@
-294,7
+294,7
@@
static void safe_exit(int code)
exit(code);
}
exit(code);
}
-#if !
USE
_SIG_MONITOR_DUMPSTACK
+#if !
WITH
_SIG_MONITOR_DUMPSTACK
static inline void safe_dumpstack(int crop, int signum) {}
#define in_safe_dumpstack (0)
static inline void safe_dumpstack(int crop, int signum) {}
#define in_safe_dumpstack (0)
@@
-387,7
+387,7
@@
void sig_monitor_clean_timeouts()
void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg)
{
void sig_monitor(int timeout, void (*function)(int sig, void*), void *arg)
{
-#if
USE_SIG_MONITOR_SIGNALS && USE
_SIG_MONITOR_FOR_CALL
+#if
WITH_SIG_MONITOR_SIGNALS && WITH
_SIG_MONITOR_FOR_CALL
if (enabled)
monitor(timeout, function, arg);
else
if (enabled)
monitor(timeout, function, arg);
else