attempt to remove the inprogress file on an unclean termination
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@222 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
c0afaba270
commit
09b7c71f72
8
ttyrec.c
8
ttyrec.c
|
@ -89,6 +89,7 @@ ttyrec_main (char *username, char* ttyrec_filename)
|
|||
snprintf (dirname, 100, "%sttyrec/%s/%s", myconfig->dglroot, username,
|
||||
ttyrec_filename);
|
||||
|
||||
atexit(&remove_ipfile);
|
||||
if ((fscript = fopen (dirname, "w")) == NULL)
|
||||
{
|
||||
perror (dirname);
|
||||
|
@ -369,3 +370,10 @@ getslave ()
|
|||
#endif /* !NOSTREAMS */
|
||||
(void) ioctl (0, TIOCGWINSZ, (char *) &win);
|
||||
}
|
||||
|
||||
void
|
||||
remove_ipfile (void)
|
||||
{
|
||||
if (ipfile != NULL)
|
||||
unlink (ipfile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue