From 6d27c0c19a1591546a2af94e2563798826ad6892 Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Mon, 18 Jun 2012 09:02:04 -0400 Subject: [PATCH] Tossed in some random chatX.dat delete calls --- mystic/mystic.pas | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mystic/mystic.pas b/mystic/mystic.pas index 3286a24..7d88e1d 100644 --- a/mystic/mystic.pas +++ b/mystic/mystic.pas @@ -119,15 +119,17 @@ Begin If Session.ExitLevel <> 0 Then ExitCode := Session.ExitLevel; If Session.EventRunAfter Then ExitCode := Session.NextEvent.ErrLevel; + FileMode := 66; + DirClean (Session.TempPath, ''); FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); {$IFNDEF LOGGING} {$IFNDEF UNIX} Screen.TextAttr := 14; + Screen.SetWindow (1, 1, 80, 25, False); Screen.ClearScreen; - Screen.WriteLine ('Exiting with Errorlevel ' + strI2S(ExitCode)); {$ENDIF} {$ENDIF} @@ -151,9 +153,19 @@ End; {$IFDEF UNIX} Procedure LinuxEventSignal (Sig : LongInt); cdecl; Begin + FileMode := 66; + Case Sig of - SIGHUP : Halt; - SIGTERM : Halt; +// SIGHUP : 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; SIGUSR2 : Begin Session.CheckTimeOut := True;