deprecate -f option (forking)
Current option -f allows users to run multiple kresd instances at once. That is good in theory has many shortcomings, namely:
- parent kresd process does not monitor child processes
- processes cannot be re/started without breaking kresd inter-process communication
- current implementation of map()command has convoluted error handling (and is error prone)
- it is harder to monitor processes from outside, e.g. using standard tools in systemd
- forking and file descriptor passing between instances is a mess
Fixing these shortcomings is of course possible, but it ultimately leads to re-implementation of supervisor process, which is even worse idea. We already have systemd/supervisord/procd for this task so let's rely on that instead of re-inventing wheel.
Proposal:
- deprecate -foption andmap()command in 5.0.0
- add warning if -formap()are used
- add new option -n/--noninteractivewhich should be used instead of-f 1
- update manuals to use new option -n+ systemd instances to run multiple processes
Wild idea:
- update map()command to use sockets inrundirinstead of FDs inherited from parent? Is it worth the complexity?