aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-04 00:41:50 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-04 00:41:50 -0400
commit591d12af19c1442c1fcc065f8a446dd244a624dc (patch)
treea73a6623fb7cd5ce43fdef8fc95edf4163e9e571 /libsandbox
parenttests: allow numeric specifications of signals (diff)
downloadsandbox-591d12af19c1442c1fcc065f8a446dd244a624dc.tar.gz
sandbox-591d12af19c1442c1fcc065f8a446dd244a624dc.tar.bz2
sandbox-591d12af19c1442c1fcc065f8a446dd244a624dc.zip
libsandbox: ignore core dumps
If the user has core dumping enabled, then we may get a dump notice from the traced child. Since this is fine by us, let it go through. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/trace.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libsandbox/trace.c b/libsandbox/trace.c
index acbda70..e4c241a 100644
--- a/libsandbox/trace.c
+++ b/libsandbox/trace.c
@@ -114,7 +114,7 @@ static char *do_peekstr(unsigned long lptr)
static const char *strcld_chld(int cld)
{
switch (cld) {
-#define C(c) case CLD_##c: return "CLD"#c;
+#define C(c) case CLD_##c: return "CLD_"#c;
C(CONTINUED)
C(DUMPED)
C(EXITED)
@@ -122,7 +122,7 @@ static const char *strcld_chld(int cld)
C(TRAPPED)
C(STOPPED)
#undef C
- default: return "CLD???";
+ default: return "CLD_???";
}
}
/* strsignal() translates the string when i want C define */
@@ -131,12 +131,16 @@ static const char *strsig(int sig)
switch (sig) {
#define S(s) case SIG##s: return "SIG"#s;
S(ABRT)
+ S(ALRM)
S(CHLD)
S(CONT)
S(HUP)
+ S(INT)
S(KILL)
+ S(QUIT)
S(SEGV)
S(STOP)
+ S(TERM)
S(TRAP)
#undef S
default: return "SIG???";
@@ -151,6 +155,7 @@ static void trace_child_signal(int signo, siginfo_t *info, void *context)
strsig(info->si_status), info->si_status);
switch (info->si_code) {
+ case CLD_DUMPED:
case CLD_KILLED:
trace_exit(128 + info->si_status);