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

Add "PRETIMEOUT" feature #47

Open
legerch opened this issue May 2, 2024 · 3 comments
Open

Add "PRETIMEOUT" feature #47

legerch opened this issue May 2, 2024 · 3 comments

Comments

@legerch
Copy link

legerch commented May 2, 2024

Hello,

First, I want to thank you for this great library :)
I mainly use it in a C application and I was looking for a way to get a kind of "warning" before the system actually perform the reboot, this could allow more easier debugging. For example, we could register a callback method to call when "pre-timeout" is trigger, allowing to log current state of the application (this is only an example).

I saw in watchdog kernel documentation that we have ioctl WDIOC_SETPRETIMEOUT which allow to register a trigger before watchdog timeout. We also have ioctl WDIOC_GETTIMELEFT allowing to retrieve remaining time before system reboot.

Do you think this kind of feature can be implemented in this library ? (maybe I'm out of specs here ?)

Have a nice day

@troglobit
Copy link
Owner

Is this a feature request?

@legerch
Copy link
Author

legerch commented May 7, 2024

Is this a feature request?

Hello,
Yes this is a feature request :) (or more like an idea to discuss). Sorry if that didn't look like it.

@troglobit
Copy link
Owner

OK. I don't have any use for this myself atm. and I would probably implement it as a libuev timer if I did. If you need it you can add it yourself, and if you want to share it you can make a pull request, then we can have a discussion.

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

No branches or pull requests

2 participants