in that case.
Move purge_stale_locks() call to before final endwin() in main().
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@69
db0b04b0-f4d1-0310-9a6d-
de3e77497b0e
char *colon;
char buf[16];
pid_t pid;
- int seconds = 0;
+ int seconds;
if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
continue;
graceful_exit (203);
fclose (ipfile);
- unlink (dent->d_name);
pid = atoi (buf);
errno = 0;
/* Wait for it to stop running */
+ seconds = 0;
while (kill (pid, 0) == 0)
{
seconds++;
kill (pid, SIGTERM);
break;
}
+ else
+ {
+ endwin();
+ fprintf(stderr, "Sorry, no nethack for you now, please "
+ "contact the admin.\n");
+ graceful_exit(1);
+ }
}
}
- seconds = 0;
+ unlink (dent->d_name);
}
closedir (pdir);
assert (loggedin);
purge_stale_locks ();
-
+
endwin ();
/* environment */