Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-11

[SYSTEM] Linux <defunct> processes when execute external program by a thread

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

TOUZEAU DAVID

Dear

my application run has a daemon
When the daemon load, it create a Timer function as a class(TThread). This Timer thread has a loop and create an another Thread (called "SendStatus" each 5 minutes)

function that load thread :
###############################################
procedure mTimer.Execute;
var
   Pool:integer;
   xPool:longint;
   Myini:TIniFile;
   thread:SendStatus;
begin
while not Terminated do
  begin
     FConfigFilePath:='/etc/artica/artica-agent.conf';
     LoadSettings;
     xPool:=(Fpool*60)*1000;
     logs('mTimer.Execute->initilize pooling for ' + IntTostr(Fpool) + '
milliseconds for each loop-> '+ IntTostr(Fpool) + ' minutes (from ' +
FConfigFilePath + ')');
     LoadSettings;
     logs('mTimer.Execute->initilize Thread Sendstatus');
                  thread:=SendStatus.Create; //Creating the new thread
                  thread.Resume;//Executing the new thread
                  thread.free;//Terminate the new thread
      logs('mTimer.Execute->kill Thread Sendstatus');
     if FMustReload=1 then begin
        Myini:=TIniFile.Create(FConfigFilePath);
        Myini.WriteInteger('ACTIONS','ReloadSettings',1);
        LoadSettings;
         xPool:=(Fpool*60)*1000;
         logs('mTimer.Execute->Reload settings -> initilize pooling for
' + IntTostr(xPool) + ' milliseconds for each loop');
        MyIni.free;
      end;
     Sleep(xPool);
  end;
end;
###############################################

The "SendStatus" execute sometimes an external program writen in fpc called "articacrypt".

the function just use Execl to execute external program
###############################################
procedure
SendStatus.DeCryptFile(Frompath:string;ToPath:string;PassPharse:string;SETT:KLNetSettings);
      var passphrase,commandline,Fbin_path:string;
    begin
    Fbin_path:=SETT.binaries_path;
    if Length(SETT.artica_crypt_key)=0 then begin
        SETT.logs('SendStatus.artica_crypt_key -> null aborting..');
       exit;
    end;
    commandline:=Fbin_path + '/articacrypt false ' + Frompath + ' ' +
ToPath + ' ' +  PassPharse;
    Execl(commandline);
    SETT.logs('SendStatus.DeCryptFile -> ' + ToPath + ' was process');
    exit;
end;
###############################################

this external program kill itself by calling halt() function at the end of the code.

My problem is that each execution of this program will add <defunc> in the Linux system :

example of ps -aux :

root 25992 0.0 0.1 20500 2292 pts/0 Sl 19:45 0:00 /opt/artica/bin/articaagentd
root 26008 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct>
root 26009 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct>
root 26010 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct>
root 26011 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct>
root 26012 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct>
root 26134 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct>
root 26135 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct>
root 26136 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct>
root 26137 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct>
root 26138 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct>
root 26247 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct>
root 26248 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct>
root 26249 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct>
root 26250 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct>
root 26251 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct>
root 26388 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct>
root 26389 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct>
root 26390 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct>
root 26391 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct>
root 26392 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct>
root 26511 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct>
root 26512 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct>
root 26513 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct>
root 26514 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct>
root 26515 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct>
root 26662 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct>
root 26663 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct>
root 26664 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct>
root 26665 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct>
root 26666 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct>
root 26787 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct>
root 26788 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct>
root 26789 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct>
root 26790 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct>
root 26791 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct>
root 26886 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct>
root 26887 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct>
root 26888 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct>
root 26889 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct>
root 26890 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct>
root 27035 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct>
root 27036 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct>
root 27037 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct>
root 27038 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct>
root 27039 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct>

Please how to clean theses "defunct" on the system...??????????????

David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849
Marco van de Voort
to TOUZEAU DAVID
Show quoted text 6 lines
this external program kill itself by calling halt() function at the end of the code. My problem is that each execution of this program will add <defunc> in the Linux system : Please how to clean theses "defunct" on the system...??????????????

Don't use execl but sysutils.executeprocess.

(fp)execl is an internal function that requires a lot of special borderconditions, one of it being called after a fork, and another that the mainprogram must wait for it.

See unix manpages, books or the executeprocess implementations for details.

Michael Van Canneyt
to TOUZEAU DAVID: Dear my application run has a daemon When the daemon load, it create a Timer function as…
TOUZEAU DAVID wrote 176 lines
Dear my application run has a daemon When the daemon load, it create a Timer function as a class(TThread). This Timer thread has a loop and create an another Thread (called "SendStatus" each 5 minutes) function that load thread : ############################################### procedure mTimer.Execute; var Pool:integer; xPool:longint; Myini:TIniFile; thread:SendStatus; begin while not Terminated do begin FConfigFilePath:='/etc/artica/artica-agent.conf'; LoadSettings; xPool:=(Fpool*60)*1000; logs('mTimer.Execute->initilize pooling for ' + IntTostr(Fpool) + ' milliseconds for each loop-> '+ IntTostr(Fpool) + ' minutes (from ' + FConfigFilePath + ')'); LoadSettings; logs('mTimer.Execute->initilize Thread Sendstatus'); thread:=SendStatus.Create; //Creating the new thread thread.Resume;//Executing the new thread thread.free;//Terminate the new thread logs('mTimer.Execute->kill Thread Sendstatus'); if FMustReload=1 then begin Myini:=TIniFile.Create(FConfigFilePath); Myini.WriteInteger('ACTIONS','ReloadSettings',1); LoadSettings; xPool:=(Fpool*60)*1000; logs('mTimer.Execute->Reload settings -> initilize pooling for ' + IntTostr(xPool) + ' milliseconds for each loop'); MyIni.free; end; Sleep(xPool); end; end; ############################################### The "SendStatus" execute sometimes an external program writen in fpc called "articacrypt". the function just use Execl to execute external program ############################################### procedure SendStatus.DeCryptFile(Frompath:string;ToPath:string;PassPharse:string;SETT:KLNetSettings); var passphrase,commandline,Fbin_path:string; begin Fbin_path:=SETT.binaries_path; if Length(SETT.artica_crypt_key)=0 then begin SETT.logs('SendStatus.artica_crypt_key -> null aborting..'); exit; end; commandline:=Fbin_path + '/articacrypt false ' + Frompath + ' ' + ToPath + ' ' + PassPharse; Execl(commandline); SETT.logs('SendStatus.DeCryptFile -> ' + ToPath + ' was process'); exit; end; ############################################### this external program kill itself by calling halt() function at the end of the code. My problem is that each execution of this program will add <defunc> in the Linux system : example of ps -aux : root 25992 0.0 0.1 20500 2292 pts/0 Sl 19:45 0:00 /opt/artica/bin/articaagentd root 26008 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct> root 26009 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct> root 26010 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct> root 26011 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct> root 26012 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] <defunct> root 26134 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct> root 26135 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct> root 26136 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct> root 26137 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct> root 26138 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] <defunct> root 26247 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct> root 26248 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct> root 26249 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct> root 26250 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct> root 26251 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] <defunct> root 26388 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct> root 26389 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct> root 26390 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct> root 26391 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct> root 26392 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] <defunct> root 26511 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct> root 26512 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct> root 26513 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct> root 26514 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct> root 26515 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] <defunct> root 26662 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct> root 26663 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct> root 26664 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct> root 26665 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct> root 26666 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] <defunct> root 26787 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct> root 26788 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct> root 26789 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct> root 26790 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct> root 26791 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] <defunct> root 26886 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct> root 26887 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct> root 26888 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct> root 26889 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct> root 26890 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] <defunct> root 27035 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct> root 27036 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct> root 27037 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct> root 27038 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct> root 27039 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] <defunct> Please how to clean theses "defunct" on the system...??????????????

You must do a fpWaitPID() call for each child process that you create.

The best way to do this is to install a SIGCHILD handler. The SIGCHILD signal is sent to a process whenever a child process exits.

In the SIGCHILD handler, you can then do the fpWaitPID() call.

Michael.

Michael Van Canneyt
to Marco van de Voort: Don't use execl but sysutils.executeprocess. (fp)execl is an internal function that…
Marco van de Voort wrote 13 lines
> this external program kill itself by calling halt() function at the end > of the code. > My problem is that each execution of this program will add <defunc> in > the Linux system : > > Please how to clean theses "defunct" on the system...?????????????? Don't use execl but sysutils.executeprocess. (fp)execl is an internal function that requires a lot of special borderconditions, one of it being called after a fork, and another that the mainprogram must wait for it.

ExecProcess waits for the child process to exit.
This does not help him, as I assume the process needs to run asynchronously ?

Michael.

TOUZEAU DAVID
to Michael Van Canneyt: You must do a fpWaitPID() call for each child process that you create. The best way to…

Many thanks but how to implement this kind of procedure SIGCHILD on the child process.

i have only these informations about ??
http://community.freepascal.org:10000/docs-html/rtl/baseunix/sigchld.html

If i understant the process must wait until the child process send Kill ? But how to receive the pid form the child process ?

if i understand the function could be ??:

###############################################
   Execl(commandline);
	fpWaitPid(??,0,WNOHANG);
###############################################

Best rgeardes

Michael Van Canneyt wrote 191 lines
On Tue, 21 Nov 2006, TOUZEAU DAVID wrote: > Dear > > my application run has a daemon > When the daemon load, it create a Timer function as a class(TThread). > This Timer thread has a loop and create an another Thread (called "SendStatus" > each 5 minutes) > > function that load thread : > ############################################### > procedure mTimer.Execute; > var > Pool:integer; > xPool:longint; > Myini:TIniFile; > thread:SendStatus; > begin > > while not Terminated do > begin > FConfigFilePath:='/etc/artica/artica-agent.conf'; > LoadSettings; > xPool:=(Fpool*60)*1000; > logs('mTimer.Execute->initilize pooling for ' + IntTostr(Fpool) + ' > milliseconds for each loop-> '+ IntTostr(Fpool) + ' minutes (from ' + > FConfigFilePath + ')'); > LoadSettings; > logs('mTimer.Execute->initilize Thread Sendstatus'); > thread:=SendStatus.Create; //Creating the new thread > thread.Resume;//Executing the new thread > thread.free;//Terminate the new thread > logs('mTimer.Execute->kill Thread Sendstatus'); > > if FMustReload=1 then begin > Myini:=TIniFile.Create(FConfigFilePath); > Myini.WriteInteger('ACTIONS','ReloadSettings',1); > LoadSettings; > xPool:=(Fpool*60)*1000; > logs('mTimer.Execute->Reload settings -> initilize pooling for > ' + IntTostr(xPool) + ' milliseconds for each loop'); > MyIni.free; > end; > Sleep(xPool); > > end; > end; > ############################################### > > > The "SendStatus" execute sometimes an external program writen in fpc called > "articacrypt". > > the function just use Execl to execute external program > ############################################### > procedure > SendStatus.DeCryptFile(Frompath:string;ToPath:string;PassPharse:string;SETT:KLNetSettings); > var passphrase,commandline,Fbin_path:string; > begin > Fbin_path:=SETT.binaries_path; > if Length(SETT.artica_crypt_key)=0 then begin > SETT.logs('SendStatus.artica_crypt_key -> null aborting..'); > exit; > end; > commandline:=Fbin_path + '/articacrypt false ' + Frompath + ' ' + > ToPath + ' ' + PassPharse; > > Execl(commandline); > > SETT.logs('SendStatus.DeCryptFile -> ' + ToPath + ' was process'); > exit; > end; > ############################################### > > this external program kill itself by calling halt() function at the end of the > code. > > > > My problem is that each execution of this program will add <defunc> in the > Linux system : > > example of ps -aux : > > root 25992 0.0 0.1 20500 2292 pts/0 Sl 19:45 0:00 > /opt/artica/bin/articaagentd > root 26008 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] > <defunct> > root 26009 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] > <defunct> > root 26010 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] > <defunct> > root 26011 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] > <defunct> > root 26012 0.0 0.0 0 0 pts/0 Z 19:45 0:00 [articacrypt] > <defunct> > root 26134 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] > <defunct> > root 26135 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] > <defunct> > root 26136 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] > <defunct> > root 26137 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] > <defunct> > root 26138 0.0 0.0 0 0 pts/0 Z 19:47 0:00 [articacrypt] > <defunct> > root 26247 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] > <defunct> > root 26248 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] > <defunct> > root 26249 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] > <defunct> > root 26250 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] > <defunct> > root 26251 0.0 0.0 0 0 pts/0 Z 19:49 0:00 [articacrypt] > <defunct> > root 26388 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] > <defunct> > root 26389 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] > <defunct> > root 26390 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] > <defunct> > root 26391 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] > <defunct> > root 26392 0.0 0.0 0 0 pts/0 Z 19:51 0:00 [articacrypt] > <defunct> > root 26511 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] > <defunct> > root 26512 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] > <defunct> > root 26513 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] > <defunct> > root 26514 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] > <defunct> > root 26515 0.0 0.0 0 0 pts/0 Z 19:53 0:00 [articacrypt] > <defunct> > root 26662 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] > <defunct> > root 26663 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] > <defunct> > root 26664 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] > <defunct> > root 26665 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] > <defunct> > root 26666 0.0 0.0 0 0 pts/0 Z 19:55 0:00 [articacrypt] > <defunct> > root 26787 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] > <defunct> > root 26788 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] > <defunct> > root 26789 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] > <defunct> > root 26790 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] > <defunct> > root 26791 0.0 0.0 0 0 pts/0 Z 19:57 0:00 [articacrypt] > <defunct> > root 26886 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] > <defunct> > root 26887 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] > <defunct> > root 26888 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] > <defunct> > root 26889 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] > <defunct> > root 26890 0.0 0.0 0 0 pts/0 Z 19:59 0:00 [articacrypt] > <defunct> > root 27035 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] > <defunct> > root 27036 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] > <defunct> > root 27037 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] > <defunct> > root 27038 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] > <defunct> > root 27039 0.0 0.0 0 0 pts/0 Z 20:01 0:00 [articacrypt] > <defunct> > > Please how to clean theses "defunct" on the system...?????????????? > You must do a fpWaitPID() call for each child process that you create. The best way to do this is to install a handler. The SIGCHILD signal is sent to a process whenever a child process exits. In the SIGCHILD handler, you can then do the fpWaitPID() call. Michael.
David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849