aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-04-29 18:53:01 -0700
committerRuss Cox <rsc@golang.org>2009-04-29 18:53:01 -0700
commitd2e42f3e487d3450e3b236bb4584f3c8ec8b8d35 (patch)
treef9daea63c428cec8f0164522048f737532666669
parentc0b8b969ae353f48445a18ea9e856f1997fba270 (diff)
downloadgo-d2e42f3e487d3450e3b236bb4584f3c8ec8b8d35.tar.xz
if the process stops with SIGTRAP (breakpoint),
don't relay the signal when restarting it. R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=28060 CL=28064
-rw-r--r--src/libmach_amd64/linux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libmach_amd64/linux.c b/src/libmach_amd64/linux.c
index 69890f09b4..b1e8d0f97e 100644
--- a/src/libmach_amd64/linux.c
+++ b/src/libmach_amd64/linux.c
@@ -610,9 +610,10 @@ procnotes(int pid, char ***pnotes)
return 0;
}
- notes = mallocz(32*sizeof(char*), 0);
+ notes = malloc(32*sizeof(char*));
if(notes == nil)
return -1;
+ memset(notes, 0, 32*sizeof(char*));
n = 0;
for(i=0; i<32; i++){
if((sigs&(1<<i)) == 0)
@@ -713,7 +714,7 @@ ctlproc(int pid, char *msg)
if(t->state == Running)
return 0;
data = 0;
- if(t->state == Stopped && t->signal != SIGSTOP)
+ if(t->state == Stopped && t->signal != SIGSTOP && t->signal != SIGTRAP)
data = t->signal;
if(trace && data)
fprint(2, "tid %d: continue %lud\n", pid, (ulong)data);