From f066597dcbb2980d503725defe18e62770bfa9cb Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Tue, 24 May 2016 20:19:46 +0000
Subject: [PATCH] Moved stop(kill) command to runner

---
 python/trisurf/trisurf.py |    7 +++++--
 python/trisurf/tsmgr.py   |    3 +--
 src/restore.c             |    1 +
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/python/trisurf/trisurf.py b/python/trisurf/trisurf.py
index bed6f7d..8b36d27 100644
--- a/python/trisurf/trisurf.py
+++ b/python/trisurf/trisurf.py
@@ -397,8 +397,6 @@
 			print("Process in "+self.Dir.fullpath()+" already running. Not starting.")
 		return
 
-	def stop(self):
-		pass
 
 	def setMaindir(self,prefix,variables):
 		maindir=""
@@ -443,6 +441,11 @@
 			report=["N/A","N/A",statustxt, pid, str(self.Dir.fullpath()), self.Comment.getText()]
 		return report
 
+
+	def stop(self):
+		p=psutil.Process(self.getPID())
+		p.kill()
+
 	def writeComment(self, data, mode='w'):
 		self.Dir=Directory(maindir=self.maindir,simdir=self.subdir)
 		self.Comment=FileContent(os.path.join(self.Dir.fullpath(),".comment"))
diff --git a/python/trisurf/tsmgr.py b/python/trisurf/tsmgr.py
index 8b38c95..fa7d20f 100644
--- a/python/trisurf/tsmgr.py
+++ b/python/trisurf/tsmgr.py
@@ -80,8 +80,7 @@
 
 		elif opt == '-k':
 			if processno:
-				p=psutil.Process(Runs[processno-1].getPID())
-				p.kill()
+				Runs[processno-1].stop()
 		else:
 			printHelp()
 			sys.exit(2)
diff --git a/src/restore.c b/src/restore.c
index 643188b..8f985de 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -57,6 +57,7 @@
 						if ((!xmlStrcmp(cur2->name, (const xmlChar *)"Points"))){
 							//fprintf(stderr,"Found point data\n");
 							if(vesicle!=NULL)
+								fprintf(stderr,"Fils: %ld, Nfono: %ld\n", vesicle->tape->nfil, vesicle->tape->nfono);
 								parseXMLVertexPosition(vesicle, doc, cur2);
 						}
 						if ((!xmlStrcmp(cur2->name, (const xmlChar *)"Cells"))){

--
Gitblit v1.9.3