Make the KDC use a multi-process model.
We now fork(2) a number of separate KDC processes rather than a single process. By default, the number is selected by asking how many CPUs the machine has. We also have a master process which monitors all of the children (which do the actual work) and it will restart kids who die for any reason. The children will die when the parent dies. In the case of MacOS X, we also move the bonjour code into another separate child as it creates threads and this is known to play rather poorly with fork(2). We could move this logic into a designated child at some point in the future. We slow down the spawning to one every 25ms to prevent instant crashes and restarts from consuming all available system time. This approach may want to be revisited in the future.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user