On Wed, 08 Nov 2006 01:25:02 -0800, Robert Bradshaw  
<[EMAIL PROTECTED]> wrote:

>
> This probably has an easy answer, but why not have a single process
> that monitors all children processes (instead of one per child).

Good question.  Longterm there are a couple of issues:

  (1) How do you tell the monitor about new processes that get spawned?
      You could put that info in a temp file, but that feels a little
      clunky.

  (2) Having another monitor for the master process would be nice,  
especially
      for cleaning up any temp files that might be left behind (in  
~/.sage/tmp)

  (3) I want to continue to support the spawned processes running on other
      computers (or as different users) via ssh.  With a separate monitor
      for each spawned process this is possible (though two ssh sessions
      would be needed).  This isn't possible if there is only one monitor,
      since it can only run on one computer.

  (4) For reasons I don't understand, the slave process doesn't really die
      until the monitor exits.  If in the monitor script instead of doing
      a sys.exit(0) after the kill, I continue the monitor running, then the
      process the monitor is watching doesn't terminate as it should.  This
      is on OS X Intel, and is rather odd, but isn't an issue with the  
1-monitor
      per process model.

  (5) The overhead is minimal -- it really is only 2MB to run a minimal
      Python process.

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to