コード例 #1
0
ファイル: _pssunos.py プロジェクト: aizhan00000/parser
 def threads(self):
     ret = []
     tids = os.listdir('/proc/%d/lwp' % self.pid)
     hit_enoent = False
     for tid in tids:
         tid = int(tid)
         try:
             utime, stime = cext.query_process_thread(self.pid, tid)
         except EnvironmentError as err:
             # ENOENT == thread gone in meantime
             if err.errno == errno.ENOENT:
                 hit_enoent = True
                 continue
             raise
         else:
             nt = _common.pthread(tid, utime, stime)
             ret.append(nt)
     if hit_enoent:
         # raise NSP if the process disappeared on us
         os.stat('/proc/%s' % self.pid)
     return ret
コード例 #2
0
ファイル: _pssunos.py プロジェクト: Andrel322/gecko-dev
 def get_process_threads(self):
     ret = []
     tids = os.listdir('/proc/%d/lwp' % self.pid)
     hit_enoent = False
     for tid in tids:
         tid = int(tid)
         try:
             utime, stime = _psutil_sunos.query_process_thread(self.pid, tid)
         except EnvironmentError:
             # ENOENT == thread gone in meantime
             err = sys.exc_info()[1]
             if err.errno == errno.ENOENT:
                 hit_enoent = True
                 continue
             raise
         else:
             nt = nt_thread(tid, utime, stime)
             ret.append(nt)
     if hit_enoent:
         # raise NSP if the process disappeared on us
         os.stat('/proc/%s' % self.pid)
     return ret
コード例 #3
0
ファイル: _pssunos.py プロジェクト: 571451370/devstack_mitaka
 def get_process_threads(self):
     ret = []
     tids = os.listdir('/proc/%d/lwp' % self.pid)
     hit_enoent = False
     for tid in tids:
         tid = int(tid)
         try:
             utime, stime = _psutil_sunos.query_process_thread(self.pid, tid)
         except EnvironmentError:
             # ENOENT == thread gone in meantime
             err = sys.exc_info()[1]
             if err.errno == errno.ENOENT:
                 hit_enoent = True
                 continue
             raise
         else:
             nt = nt_thread(tid, utime, stime)
             ret.append(nt)
     if hit_enoent:
         # raise NSP if the process disappeared on us
         os.stat('/proc/%s' % self.pid)
     return ret
コード例 #4
0
ファイル: _pssunos.py プロジェクト: 2089764/psutil
 def threads(self):
     ret = []
     tids = os.listdir('/proc/%d/lwp' % self.pid)
     hit_enoent = False
     for tid in tids:
         tid = int(tid)
         try:
             utime, stime = cext.query_process_thread(
                 self.pid, tid)
         except EnvironmentError as err:
             # ENOENT == thread gone in meantime
             if err.errno == errno.ENOENT:
                 hit_enoent = True
                 continue
             raise
         else:
             nt = _common.pthread(tid, utime, stime)
             ret.append(nt)
     if hit_enoent:
         # raise NSP if the process disappeared on us
         os.stat('/proc/%s' % self.pid)
     return ret