Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added watchdog module. #232

Merged
merged 4 commits into from
Aug 8, 2014
Merged

Added watchdog module. #232

merged 4 commits into from
Aug 8, 2014

Conversation

eugeneia
Copy link
Member

This adds the module lib.watchdog.watchdog whose purpose is to provide a simple process supervision service. The idea is to set up a "watchdog" with a specified timeout. Unless the timeout is reset in time, the watchdog will kill the process because it is assumed that the offending process is hanging.

The implementation works as follows (roughly speaking): The process periodically resets an alarm(3), resetting the previous alarm each time. If it fails to reset the alarm, it will receive a SIGALRM which it does not handle, and thus it is killed.

For a detailed usage description see the file src/watchdog/README.md.

NOTE: This pull request also introduces a new way to write tests. It adjusts src/Makefile to look for executables named selftest.sh in the src/ directory and run them as tests.

lukego added a commit that referenced this pull request Aug 8, 2014
@lukego lukego merged commit 6b0feea into snabbco:master Aug 8, 2014
@eugeneia eugeneia deleted the watchdog branch May 20, 2015 12:52
dpino pushed a commit to dpino/snabb that referenced this pull request Feb 9, 2016
Flush JIT when reloading binding table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants