]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve Linux scripts
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 3 Sep 2015 11:34:24 +0000 (14:34 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 3 Sep 2015 11:34:24 +0000 (14:34 +0300)
.gdbinit [new file with mode: 0644]
salome_pid.py [new file with mode: 0755]

diff --git a/.gdbinit b/.gdbinit
new file mode 100644 (file)
index 0000000..a90a4d5
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,10 @@
+set pagination off
+set logging file gdb.txt
+set logging redirect on
+set logging on
+catch throw
+echo Run application in GDB
+continue
+backtrace full
+set logging off
+quit
diff --git a/salome_pid.py b/salome_pid.py
new file mode 100755 (executable)
index 0000000..6a32bf4
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/env python
+
+import sys, pickle
+from killSalome import *
+
+process = sys.argv[2] #SALOME_Session_Server"
+
+salome_port = sys.argv[1]
+filedict = getPiDict(salome_port)
+process_ids = pickle.load(open(filedict, 'r'))
+
+pid = -1
+for list_item in process_ids:
+  for _pid, name_list in list_item.items():
+    if process in name_list:
+      pid = _pid
+
+print pid