Tossed in some random chatX.dat delete calls

This commit is contained in:
mysticbbs 2012-06-18 09:02:04 -04:00
parent 32b416817e
commit 6d27c0c19a
1 changed files with 15 additions and 3 deletions

View File

@ -119,15 +119,17 @@ Begin
If Session.ExitLevel <> 0 Then ExitCode := Session.ExitLevel; If Session.ExitLevel <> 0 Then ExitCode := Session.ExitLevel;
If Session.EventRunAfter Then ExitCode := Session.NextEvent.ErrLevel; If Session.EventRunAfter Then ExitCode := Session.NextEvent.ErrLevel;
FileMode := 66;
DirClean (Session.TempPath, ''); DirClean (Session.TempPath, '');
FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
{$IFNDEF LOGGING} {$IFNDEF LOGGING}
{$IFNDEF UNIX} {$IFNDEF UNIX}
Screen.TextAttr := 14; Screen.TextAttr := 14;
Screen.SetWindow (1, 1, 80, 25, False); Screen.SetWindow (1, 1, 80, 25, False);
Screen.ClearScreen; Screen.ClearScreen;
Screen.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode)); Screen.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode));
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
@ -151,9 +153,19 @@ End;
{$IFDEF UNIX} {$IFDEF UNIX}
Procedure LinuxEventSignal (Sig : LongInt); cdecl; Procedure LinuxEventSignal (Sig : LongInt); cdecl;
Begin Begin
FileMode := 66;
Case Sig of Case Sig of
SIGHUP : Halt; // SIGHUP : Halt;
SIGTERM : Halt; // SIGTERM : Halt;
SIGHUP : Begin
FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
Halt;
End;
SIGTERM : Begin
FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
Halt;
End;
SIGUSR1 : Session.CheckTimeOut := False; SIGUSR1 : Session.CheckTimeOut := False;
SIGUSR2 : Begin SIGUSR2 : Begin
Session.CheckTimeOut := True; Session.CheckTimeOut := True;