From: spo Date: Thu, 3 Sep 2015 11:34:24 +0000 (+0300) Subject: Improve Linux scripts X-Git-Tag: V_1.4.0_beta4~136 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=143038cf992d8e8aa980f470c0f5d254530e251e;p=modules%2Fshaper.git Improve Linux scripts --- diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 000000000..a90a4d59d --- /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 index 000000000..6a32bf4ba --- /dev/null +++ b/salome_pid.py @@ -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