Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: make it harder to skip graceful shutdown accidentally#1327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 2 commits intomainfromspike/631-dont-allow-double-ctrl-c
May 6, 2022

Conversation

spikecurtis
Copy link
Contributor

Signed-off-by: Spike Curtisspike@coder.com

Makes it harder to accidentally skip graceful shutdown (which, in--dev mode includes cleaning up workspaces) by not allowing a second ctrl+C to kill the program. If you really want to kill graceful shutdown, you can use ctrl+\ (SIGQUIT).

Subtasks

  • added a test for feature

Fixes#631

Signed-off-by: Spike Curtis <spike@coder.com>
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@codecov
Copy link

codecovbot commentedMay 6, 2022
edited
Loading

Codecov Report

Merging#1327 (ff7e74c) intomain (57bb108) willincrease coverage by8.36%.
The diff coverage is100.00%.

@@            Coverage Diff             @@##             main    #1327      +/-   ##==========================================+ Coverage   58.09%   66.45%   +8.36%==========================================  Files         282      282                Lines       18521    18522       +1       Branches      231      231              ==========================================+ Hits        10759    12309    +1550+ Misses       6601     4949    -1652- Partials     1161     1264     +103
FlagCoverage Δ
unittest-go-macos-latest53.68% <100.00%> (+<0.01%)⬆️
unittest-go-postgres-65.12% <100.00%> (?)
unittest-go-ubuntu-latest56.10% <100.00%> (+0.05%)⬆️
unittest-go-windows-202252.00% <0.00%> (-0.02%)⬇️
unittest-js73.14% <ø> (ø)
Impacted FilesCoverage Δ
cli/server.go57.51% <100.00%> (+3.70%)⬆️
codersdk/provisionerdaemons.go61.97% <0.00%> (-5.64%)⬇️
provisioner/echo/serve.go56.80% <0.00%> (ø)
agent/agent.go66.94% <0.00%> (+0.41%)⬆️
coderd/provisionerdaemons.go62.98% <0.00%> (+0.50%)⬆️
coderd/workspaceagents.go56.04% <0.00%> (+0.69%)⬆️
provisionerd/provisionerd.go77.64% <0.00%> (+1.20%)⬆️
coderd/templates.go62.29% <0.00%> (+1.63%)⬆️
peer/conn.go80.34% <0.00%> (+2.94%)⬆️
... and7 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update57bb108...ff7e74c. Read thecomment docs.

Copy link
Member

@bpmctbpmct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this is awesome

Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis merged commitad8d9dd intomainMay 6, 2022
@spikecurtisspikecurtis deleted the spike/631-dont-allow-double-ctrl-c branchMay 6, 2022 20:45
@mafredri
Copy link
Member

mafredri commentedMay 11, 2022
edited
Loading

TIL aboutCtrl+\ too, very neat.

I realize this PR is merged but wanted to give a heads up about non-English keyboard users who'd have to hitCtrl+Shift+Alt+7 (at least on macOS). Some may end up unable to escape (queue joke about VIM).

Edit: Actually that combination doesn't even work (I just tested), you get\ withShift+Alt+7 but addCtrl and all you get is7.

@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
* feat: make it harder to skip graceful shutdown accidentallySigned-off-by: Spike Curtis <spike@coder.com>* fixup: don't use unbuffered signal channelSigned-off-by: Spike Curtis <spike@coder.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

@bpmctbpmctbpmct approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

Add double confirmation for SIGINT oncoder --dev
5 participants
@spikecurtis@mafredri@kylecarbs@bpmct@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp