-
Notifications
You must be signed in to change notification settings - Fork 4
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
ztpd exit code is always 0 regardless of exit condition #13
Comments
The The return value should be specified using the int
event_loop_stop(struct event_loop *loop, int retval) Where |
Do you want the error code to only be propagated if we enter on_signal_received, or should we have the error code from other events, like dpp_start, to also be propagated up to main? `
} It looks like this is the only place where event_loop_stop is being used. |
I think it makes sense to only propagate from where |
Ok, so I only have to worry about if ztpd received a SIGINT or a SIGTERM for this issue right? |
Yep, seems like that's the only place where the event loop is stopped. |
Describe the bug
The
ztpd
daemon always returns a 0 exit code from its main process, regardless of whether the process exited cleanly or not. This is due toztpd_run()
having avoid
return type.To Reproduce
Steps to reproduce the behavior:
ztpd -c /path/to/ztpd/config.json -d
kill -9 $(pidof -s ztpd)
Expected behavior
ztpd
exits with a non-zero exit code.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: