com_stat: abort on server crashes
[paraslash.git] / command.c
index 52d56c9eba015880000db26e4183814434ad6f39..55070a3d7a89950051a1374c400511527c19b7a9 100644 (file)
--- a/command.c
+++ b/command.c
@@ -690,7 +690,9 @@ static int com_stat(int socket_fd, int argc, char **argv)
                ret = 1;
                if (num == 1)
                        goto out;
-               usleep(500000 * 100);
+               sleep(50);
+               if (getppid() == 1)
+                       return -E_SERVER_CRASH;
        }
 out:
        return ret;