[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Removed xen.util.process, as no-one is using it, and it leaves defunct processes



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 4d49f61a7feef3fca5fb3e991a5a1d741b6cd690
# Parent  021324804fbd8b84ad5fc519491318c9e2d54291
Removed xen.util.process, as no-one is using it, and it leaves defunct processes
behind.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 021324804fbd -r 4d49f61a7fee tools/python/xen/util/process.py
--- a/tools/python/xen/util/process.py  Fri Oct 21 10:21:05 2005
+++ /dev/null   Fri Oct 21 10:22:48 2005
@@ -1,39 +0,0 @@
-# Copyright (C) 2005 Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
-
-# os.system() replacement which outputs through the logger
-
-import popen2
-import select
-import string
-
-from xen.xend.XendLogging import log
-
-def runscript(cmd):
-    # split after first space, then grab last component of path
-    cmdname = "[%s] " % cmd.split()[0].split('/')[-1]
-    # run command and grab stdin, stdout and stderr
-    cout, cin, cerr = popen2.popen3(cmd)
-    # close stdin to get command to terminate if it waits for input
-    cin.close()
-    # wait for output and process
-    p = select.poll()
-    p.register(cout)
-    p.register(cerr)
-    stdout = ""
-    while True:
-        r = p.poll()
-        for (fd, event) in r:
-            if event == select.POLLHUP:
-                cout.close()
-                cerr.close()
-                return stdout
-            if fd == cout.fileno():
-                stdout = stdout + cout.readline()
-            if fd == cerr.fileno():
-                l = cerr.readline()
-                if l[0] == '-':
-                    log.debug(cmdname + l[1:].rstrip())
-                elif l[0] == '*':
-                    log.info(cmdname + l[1:].rstrip())
-                else:
-                    log.error(cmdname + l.rstrip())

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.