SIGINT vs SIGTERM: does it matter?

302 views
Skip to first unread message

Jeffrey 'jf' Lim

unread,
Apr 5, 2017, 4:10:58 AM4/5/17
to consu...@googlegroups.com
Just wondering: looking at the docs for the behaviour when consul
encounters a SIGINT vs a SIGTERM
(https://www.consul.io/docs/agent/options.html#skip_leave_on_interrupt
vs https://www.consul.io/docs/agent/options.html#leave_on_terminate),
it seems like the behaviour is the same: if in client-mode, leave
before quitting; and if in server-mode, do not leave before quitting.
Therefore, does it matter whether I use a SIGINT or a SIGTERM to kill
a consul process?

I ask because I saw one sample systemd file where an explicit
'KillSignal=SIGINT' is specified (systemd's default is SIGTERM).

-jf

--
He who settles on the idea of the intelligent man as a static entity
only shows himself to be a fool.

James Phillips

unread,
Apr 12, 2017, 2:08:03 AM4/12/17
to consu...@googlegroups.com
Hi, you are correct that they land in essentially the same code path -
https://github.com/hashicorp/consul/blob/master/command/agent/command.go#L1193-L1204.
> --
> This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/consul/issues
> IRC: #consul on Freenode
> ---
> You received this message because you are subscribed to the Google Groups "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/CAE4WMGinr9_vsYC94BwruXUgM3AkyX34A69e8v2ie36m7vtCjg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Jeffrey 'jf' Lim

unread,
Apr 12, 2017, 2:25:23 AM4/12/17
to consu...@googlegroups.com
thank you James. Very helpful!

-jf
Reply all
Reply to author
Forward
0 new messages