X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fkillpid.h;h=e35f8d994ec58b027788b2dfffb366d55fec567b;hb=921fa70d5f91d895881c19502503cd4bd4bcabde;hp=becfd0ed8f0be7c460a7e31e9296c7ea835ea06b;hpb=b77f874c7d7ff386d01eeedb44c14d3003354bae;p=m6w6%2Flibmemcached diff --git a/libtest/killpid.h b/libtest/killpid.h index becfd0ed..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); + +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); +}