freebsd-dev/usr.sbin/daemon
Ihor Antonov 4c41f4a0d6 daemon: decouple init logic from main loop
main() func contained both initialization and main loop logic.
This made certain operations like restarting problematic and
required dirty hacks in form of goto jumps.

This commit moves the main loop logic into daemon_eventloop(),
cleans up main, and makes restart logic clear: daemon_mainloop()
is run in a loop with a restart condition checked at the end.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/699
2023-03-22 21:37:12 -05:00
..
tests daemon: add some basic tests 2021-05-03 09:55:40 -06:00
daemon.8 daemon: add long_opts 2023-02-09 22:36:07 -06:00
daemon.c daemon: decouple init logic from main loop 2023-03-22 21:37:12 -05:00
Makefile daemon: add some basic tests 2021-05-03 09:55:40 -06:00
Makefile.depend