Skip to content

Conversation

@CarlJi
Copy link
Collaborator

@CarlJi CarlJi commented Mar 3, 2021

fix #171

@qiniu-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CarlJi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@CarlJi
Copy link
Collaborator Author

CarlJi commented Mar 3, 2021

/assign @lyyyuna

@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #173 (120ffa3) into master (42f0dfc) will increase coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   67.77%   68.00%   +0.23%     
==========================================
  Files          34       34              
  Lines        1738     1738              
==========================================
+ Hits         1178     1182       +4     
+ Misses        454      451       -3     
+ Partials      106      105       -1     
Flag Coverage Δ
e2e-1.11.x 100.00% <ø> (ø)
e2e-1.12.x 100.00% <ø> (ø)
e2e-1.13.x 100.00% <ø> (ø)
e2e-1.14.x 100.00% <ø> (ø)
e2e-1.15.x 100.00% <ø> (ø)
e2e-1.16.x 100.00% <ø> (ø)
unittest-1.13.x 67.77% <ø> (ø)
unittest-1.14.x 67.89% <ø> (+0.11%) ⬆️
unittest-1.15.x 67.89% <ø> (+0.11%) ⬆️
unittest-1.16.x 67.89% <ø> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cover/instrument.go 19.04% <ø> (ø)
pkg/build/legacy.go 100.00% <0.00%> (+5.88%) ⬆️
pkg/build/gomodules.go 100.00% <0.00%> (+6.45%) ⬆️

@lyyyuna
Copy link
Collaborator

lyyyuna commented Mar 3, 2021

注意到我们有自己的 signal notify,这种行为会导致用户原有的一些退出逻辑被破坏:
比如用户原程序注册 signal notify,执行时长为 10s 的清理任务再退出,这时候 goc 注入的 notify 立马 os.Exit() 会直接打断这一行为。

signal handler 目前我想到的分两种情况:

  1. go 的 signal notify。看文档允许多个 channel 对应同一个 singnal (https://golang.org/pkg/os/signal/#Notify)
  2. linux c 的 signal handler,和 go 抽象过的不同,只能一个。

这部分有必要重新设计。

@CarlJi
Copy link
Collaborator Author

CarlJi commented Mar 4, 2021

@lyyyuna 出个方案,我们一起讨论下。

@CarlJi
Copy link
Collaborator Author

CarlJi commented Mar 18, 2021

看起来没有更好的方案,先合并以修复问题。

@CarlJi CarlJi merged commit 4f04bb4 into qiniu:master Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mac 执行完goc build . --debug之后无法使用control+c关闭程序

3 participants