Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
pubx
delve
提交
03792601
D
delve
项目概览
pubx
/
delve
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
delve
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
03792601
编写于
2月 15, 2016
作者:
A
aarzilli
提交者:
Derek Parker
2月 24, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
proc: bugfix: propagate signals we don't handle to inferior
Fixes #419 (partial)
上级
63a66082
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
41 addition
and
3 deletion
+41
-3
proc/proc_linux.go
proc/proc_linux.go
+4
-1
proc/proc_unix_test.go
proc/proc_unix_test.go
+31
-0
proc/threads_linux.go
proc/threads_linux.go
+6
-2
未找到文件。
proc/proc_linux.go
浏览文件 @
03792601
...
...
@@ -317,7 +317,10 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
}
if
th
!=
nil
{
// TODO(dp) alert user about unexpected signals here.
if
err
:=
th
.
Continue
();
err
!=
nil
{
if
err
:=
th
.
resumeWithSig
(
int
(
status
.
StopSignal
()));
err
!=
nil
{
if
err
==
sys
.
ESRCH
{
return
nil
,
ProcessExitedError
{
Pid
:
dbp
.
Pid
}
}
return
nil
,
err
}
}
...
...
proc/proc_unix_test.go
0 → 100644
浏览文件 @
03792601
// +build linux darwin
package
proc
import
(
"testing"
"time"
"syscall"
protest
"github.com/derekparker/delve/proc/test"
)
func
TestIssue419
(
t
*
testing
.
T
)
{
// SIGINT directed at the inferior should be passed along not swallowed by delve
withTestProcess
(
"issue419"
,
t
,
func
(
p
*
Process
,
fixture
protest
.
Fixture
)
{
go
func
()
{
for
{
if
p
.
Running
()
{
time
.
Sleep
(
2
*
time
.
Second
)
err
:=
syscall
.
Kill
(
p
.
Pid
,
syscall
.
SIGINT
)
assertNoError
(
err
,
t
,
"syscall.Kill"
)
return
}
}
}()
err
:=
p
.
Continue
()
if
_
,
exited
:=
err
.
(
ProcessExitedError
);
!
exited
{
t
.
Fatalf
(
"Unexpected error after Continue(): %v
\n
"
,
err
)
}
})
}
proc/threads_linux.go
浏览文件 @
03792601
...
...
@@ -33,9 +33,13 @@ func (t *Thread) stopped() bool {
return
state
==
StatusTraceStop
}
func
(
t
*
Thread
)
resume
()
(
err
error
)
{
func
(
t
*
Thread
)
resume
()
error
{
return
t
.
resumeWithSig
(
0
)
}
func
(
t
*
Thread
)
resumeWithSig
(
sig
int
)
(
err
error
)
{
t
.
running
=
true
t
.
dbp
.
execPtraceFunc
(
func
()
{
err
=
PtraceCont
(
t
.
ID
,
0
)
})
t
.
dbp
.
execPtraceFunc
(
func
()
{
err
=
PtraceCont
(
t
.
ID
,
sig
)
})
return
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录