|
@@ -80,7 +80,10 @@ class PManager:
|
|
|
if j["command"] == "netcat":
|
|
if j["command"] == "netcat":
|
|
|
sendmsg(j["key"])
|
|
sendmsg(j["key"])
|
|
|
if j["command"] == "status": #and j["key"] == self.name:
|
|
if j["command"] == "status": #and j["key"] == self.name:
|
|
|
- self.send({"type": "snowmix", "subtype": "statusreport", "name": self.name, "data":self.p_list})
|
|
|
|
|
|
|
+ self.sendstatus()
|
|
|
|
|
+
|
|
|
|
|
+ def sendstatus(self):
|
|
|
|
|
+ self.send({"type": "snowmix", "subtype": "statusreport", "name": self.name, "data":self.p_list})
|
|
|
|
|
|
|
|
def send(self, data):
|
|
def send(self, data):
|
|
|
try:
|
|
try:
|
|
@@ -117,6 +120,7 @@ class PManager:
|
|
|
if key not in self.p_list:
|
|
if key not in self.p_list:
|
|
|
log("key %s doesn't exist! not killing!" % (key))
|
|
log("key %s doesn't exist! not killing!" % (key))
|
|
|
return
|
|
return
|
|
|
|
|
+ self.sendstatus()
|
|
|
try:
|
|
try:
|
|
|
os.killpg(os.getpgid(self.p_list[key]), signal.SIGTERM)
|
|
os.killpg(os.getpgid(self.p_list[key]), signal.SIGTERM)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
@@ -152,6 +156,7 @@ class PManager:
|
|
|
log("This process (%s) is not on my table!" % key)
|
|
log("This process (%s) is not on my table!" % key)
|
|
|
return
|
|
return
|
|
|
|
|
|
|
|
|
|
+ self.sendstatus()
|
|
|
log("Launching! key: %s, opts: %s" % (key, options))
|
|
log("Launching! key: %s, opts: %s" % (key, options))
|
|
|
tolaunch = self.ptable[key]
|
|
tolaunch = self.ptable[key]
|
|
|
if options is not None:
|
|
if options is not None:
|