You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by "Leo Simons (JIRA)" <ge...@gump.apache.org> on 2005/04/15 12:39:35 UTC

[jira] Commented: (GUMP-95) gump.util.executor.Executor component for cleaning up processes

     [ http://issues.apache.org/jira/browse/GUMP-95?page=comments#action_62888 ]
     
Leo Simons commented on GUMP-95:
--------------------------------

Step one in avoiding zombie processes is starting to use the "subprocess" module for everything. It does waitpid() for everything, and also does the alternative to that on windows.

Step two is to start using one (1) process group for every child that we start using subprocess. This can be accomplished using a

  x = setpgrp()

inside the main gump process, then a 

  setpgid(x)

in the child. Since subprocess uses apply() to run its preexec_fn, we can do that with subprocess, ie

  set_process_group = lambda: os.setpgid(x)
  Popen(..., preexec_fn=set_process_group)

then after that we can use the algorithm ed & greg provided passing in the "x" group.

> gump.util.executor.Executor component for cleaning up processes
> ---------------------------------------------------------------
>
>          Key: GUMP-95
>          URL: http://issues.apache.org/jira/browse/GUMP-95
>      Project: Gump
>         Type: New Feature
>   Components: Python-based Gump
>     Versions: Gump3-alpha
>     Reporter: Leo Simons
>      Fix For: Gump3-alpha

>
> Gump fires off lots of different processes that may fire off new processes that may in turn create processes that may not be very good at cleaning up after themselves.
> For simple relatively short-running commands that we trust to clean up after themselves (like self-updating ourselves from svn or grepping a file or whatever), we can trust in the subprocess module that comes with python. For other tasks such as firing up actual builds, we should have something more robust.
> A skeleton algorithm is provided at:
> http://mail-archives.apache.org/mod_mbox/gump-general/200503.mbox/%3c20050321024652.GL5235@lyra.org%3e

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org