-pid_t check_pid (const char *pidfile)
-{
- pid_t pid = read_pid(pidfile);
-
- /* Amazing ! _I_ am already holding the pid file... */
- if ((!pid) || (pid == getpid ()))
- return 0;
-
- /*
- * The 'standard' method of doing this is to try and do a 'fake' kill
- * of the process. If an ESRCH error is returned the process cannot
- * be found -- GW
- */
- /* But... errno is usually changed only on error.. */
- errno = 0;
- if (kill(pid, 0) && errno == ESRCH)
- return 0;
-
- return pid;
+pid_t check_pid(const char *pidfile) {
+ pid_t pid = read_pid(pidfile);
+
+ /* Amazing ! _I_ am already holding the pid file... */
+ if((!pid) || (pid == getpid())) {
+ return 0;
+ }
+
+ /*
+ * The 'standard' method of doing this is to try and do a 'fake' kill
+ * of the process. If an ESRCH error is returned the process cannot
+ * be found -- GW
+ */
+ /* But... errno is usually changed only on error.. */
+ errno = 0;
+
+ if(kill(pid, 0) && errno == ESRCH) {
+ return 0;
+ }
+
+ return pid;