-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added handling of SIGHUP and SIGTERM to handle a clean exit: and avoi…
…d leaking gopls daemons
- Loading branch information
1 parent
3f10df7
commit 00adde7
Showing
4 changed files
with
48 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//go:build linux || darwin | ||
|
||
package kernel | ||
|
||
import ( | ||
"os" | ||
"syscall" | ||
) | ||
|
||
// CaptureSignals list all signals to be captured: except of `os.Interrupt` (Control+C), all others trigger | ||
// a clean exit of GoNB kernel. | ||
// | ||
// Notice `os.Interrupt` is used by Jupyter to signal to interrupt the execution of the current cell. | ||
var CaptureSignals = []os.Signal{ | ||
os.Interrupt, syscall.SIGHUP, syscall.SIGTERM, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//go:build !(linux || darwin) | ||
|
||
package kernel | ||
|
||
import ( | ||
"os" | ||
) | ||
|
||
// CaptureSignals list all signals to be captured: except of `os.Interrupt` (Control+C), all others trigger | ||
// a clean exit of GoNB kernel. | ||
// | ||
// Notice `os.Interrupt` is used by Jupyter to signal to interrupt the execution of the current cell. | ||
var CaptureSignals = []os.Signal{os.Interrupt} |