Skip to content

[cbuild] should listen to signal and terminate appropriately when receiving SIGTERM #175

Description

@acabarbaye

we are running the cbuild using subprocesses or in containers and so, we make use of unix signals to control the tool (e.g. use of timeout, https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination,etc.). Nonetheless, the tool does not listen to unix signals (such as https://gobyexample.com/signals) and spawns or opens resources such as subprocesses, files, etc. If the tool process receives a SIGKILL, it will hence, most likely, leave resources in a bad state (e.g. open file, hanging subprocesses)

A solution to this would be to ensure the tool listens to signals such as SIGTERM and properly closes any open resources when such signal is received (in other words, it should close gracefully). The use of context could be leveraged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions