Zombie killer
This commit is contained in:
parent
25af81e712
commit
eaa1abb2fd
|
@ -132,14 +132,15 @@ End;
|
||||||
{$IFDEF USEFORK}
|
{$IFDEF USEFORK}
|
||||||
Procedure TTelnetServer.Execute;
|
Procedure TTelnetServer.Execute;
|
||||||
Var
|
Var
|
||||||
Num : LongInt;
|
Num : LongInt;
|
||||||
NI : TNodeInfoRec;
|
NI : TNodeInfoRec;
|
||||||
PID : LongInt;
|
PID : LongInt;
|
||||||
PTYFD : LongInt;
|
PTYFD : LongInt;
|
||||||
RDFDSET : TFDSet;
|
RDFDSET : TFDSet;
|
||||||
Count : LongInt;
|
Count : LongInt;
|
||||||
Buffer : Array[1..8 * 1024] of Char;
|
Buffer : Array[1..8 * 1024] of Char;
|
||||||
MaxFD : LongInt;
|
MaxFD : LongInt;
|
||||||
|
WaitStat : LongInt;
|
||||||
Begin
|
Begin
|
||||||
Client.FTelnetServer := True;
|
Client.FTelnetServer := True;
|
||||||
|
|
||||||
|
@ -198,6 +199,9 @@ Begin
|
||||||
|
|
||||||
fpClose (PTYFD);
|
fpClose (PTYFD);
|
||||||
|
|
||||||
|
Repeat
|
||||||
|
Until fpWaitPID(PID, WaitStat, WUNTRACED) = PID;
|
||||||
|
|
||||||
NI.Busy := False;
|
NI.Busy := False;
|
||||||
NI.IP := '';
|
NI.IP := '';
|
||||||
NI.User := '';
|
NI.User := '';
|
||||||
|
|
Loading…
Reference in New Issue