Why both os.Interrupt and syscall.SIGTERM #20
-
os.Interrupt is a variable to syscall.SIGTERM or incase of Plan9 syscall.Note("interrupt") In reference to: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @gcstang
The idea with supporting both is to enable the local development as well as the future use case where the process is running in a docker container. Were you suggesting to explicitly indicate |
Beta Was this translation helpful? Give feedback.
-
in the example you have all 3 instead of just two,I was wondering why
instead of just SIGINT and SIGTERM
or os.Interrupt and SIGTERM
…On Fri, Aug 6, 2021, 12:37 Mario Carrion ***@***.***> wrote:
Hello @gcstang <https://github.com/gcstang>
- os.Interrupt is an "alias" to syscall.SIGINT:
https://pkg.go.dev/os#Interrupt ; it's used to support stopping the
process locally, typically when using CONTROL+C.
- syscall.SIGTERM is the default signal sent by docker to the main
process to stop it
https://docs.docker.com/engine/reference/commandline/stop/ ; other
services like (AWS ECS
<https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_StopTask.html>)
also use the same signal to stop running containers.
The idea with supporting both is to enable the local development as well
as the future use case where the process is running in a docker container.
Were you suggesting to explicitly indicate syscall.SIGINT instead, to
make things clearer? If so I think that change is reasonable considering
this is only building binaries for Linux at the moment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYGIKN7Z6HL3ULAYG5U6YLT3Q2X5ANCNFSM5BWPWLBA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Beta Was this translation helpful? Give feedback.
Hello @gcstang
os.Interrupt
is an "alias" tosyscall.SIGINT
: https://pkg.go.dev/os#Interrupt ; it's used to support stopping the process locally, typically when usingCONTROL+C
.syscall.SIGTERM
is the default signal sent by docker to the main process to stop it https://docs.docker.com/engine/reference/commandline/stop/ ; other services like (AWS ECS) also use the same signal to stop running containers.The idea with supporting both is to enable the local development as well as the future use case where the process is running in a docker container.
Were you suggesting to explicitly indicate
syscall.SIGINT
instead, to make things clearer? If so I think that change is reasonable considerin…