X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fkillpid.h;h=e35f8d994ec58b027788b2dfffb366d55fec567b;hb=e62187d9544abeffaa8552742da6c154fb77cf7c;hp=83c7bb0a94c87591a7e7dd584c81246d3ff86b24;hpb=8fa241b9251e81929bd07410e9f598c88ee08242;p=awesomized%2Flibmemcached diff --git a/libtest/killpid.h b/libtest/killpid.h index 83c7bb0a..e35f8d99 100644 --- a/libtest/killpid.h +++ b/libtest/killpid.h @@ -25,6 +25,13 @@ bool kill_pid(pid_t pid_arg); -pid_t kill_file(const std::string &filename); +bool kill_file(const std::string &filename); -pid_t get_pid_from_file(const std::string &filename); +bool check_pid(const std::string &filename); + +pid_t get_pid_from_file(const std::string &filename, std::stringstream& error_message); + +static inline bool check_pid(pid_t pid_arg) +{ + return (pid_arg > 1); +}