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

Marco van de Voort marcov at stack.nl
Tue Nov 21 21:33:28 CET 2006


 
> 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.



More information about the fpc-pascal mailing list