MCPcopy Create free account
hub / github.com/apple/foundationdb / kill_process

Function kill_process

fdbmonitor/fdbmonitor.cpp:887–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887void 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
903void 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);

Callers 2

load_confFunction · 0.85
mainFunction · 0.85

Calls 3

log_msgFunction · 0.85
killFunction · 0.50
eraseMethod · 0.45

Tested by

no test coverage detected