Hi,

In fgGUI applications I often launch other applications. eg: The help
viewer etc. In such cases, I simply want to launch the application and
then forget about it. I have no need to read any stdout etc.

I've been using TProcess for this task as follows:

  p := TProcess.Create(nil);
  try
    p.Executable := ...
    p.Execute;
  finally
    p.free
  end;

As TProcess is a TComponent descendant, I specify nil as the Owner, thus
I manually free it. It was brought to my attention that if the user has
a long running application (eg: an RSS feed reader - lunching a web
browser via TProcess), after a while they have many Zombie processes in
Linux hanging around until the fpGUI application terminates.

Two things:

  1.  The way I create the TProcess. Why or how does it have
      a dependency on the fpGUI application?

  2.  Anybody else experience this zombie processes hanging
      around in *nix systems? Is there any option in TProcess
      to prevent that?

ie: I want to launch a new application in a separate OS process and then
forget about it.


Regards,
  Graeme
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to