+ FILE *fp;
+ if ((fp= fopen(filename.c_str(), "r")))
+ {
+ libtest::vchar_t pid_buffer;
+ pid_buffer.resize(1024);
+
+ char *ptr= fgets(&pid_buffer[0], int(pid_buffer.size()), fp);
+ fclose(fp);
+
+ if (ptr)
+ {
+ pid_t pid= (pid_t)atoi(&pid_buffer[0]);
+ if (pid > 0)
+ {
+ return (::kill(pid, 0) == 0);
+ }
+ }
+ }
+
+ return false;