coreos/go-systemd

Provide error handling for Reboot() call

invidian opened this issue · 4 comments

Right now user has no way of knowing if calling Reboot() succeeds or not, as no error is returned from a call. E.g. if user calling it has no permissions to do so, the call will silently fail.

This could be improved, e.g. together with accepting the context for operation in new function.

lucab commented

Good idea, a RebootWithContext would fit nicely. Would you like to submit a PR with that?

Can't promise I find time to do so, but will try :)

Ah, just found out there is more general issue for this: #326, not sure if it make sense to address each method individually or should we handle all of them at once.

Created #390 to address this.