| 885 | } |
| 886 | |
| 887 | void kill_process(ProcessID id, bool wait = true, bool cleanup = true) { |
| 888 | pid_t pid = id_pid[id]; |
| 889 | |
| 890 | log_msg(SevInfo, "Killing process %d\n", pid); |
| 891 | |
| 892 | kill(pid, SIGTERM); |
| 893 | if (wait) { |
| 894 | waitpid(pid, nullptr, 0); |
| 895 | } |
| 896 | |
| 897 | if (cleanup) { |
| 898 | pid_id.erase(pid); |
| 899 | id_pid.erase(id); |
| 900 | } |
| 901 | } |
| 902 | |
| 903 | void load_conf(const char* confpath, uid_t& uid, gid_t& gid, sigset_t* mask, fdb_fd_set rfds, int* maxfd) { |
| 904 | log_msg(SevInfo, "Loading configuration %s\n", confpath); |