def uid(pid):
 (start_time, parameter) = (time.time(), 'uid')
 status_path = ('/proc/%s/status' % pid)
 uid_line = _get_line(status_path, 'Uid:', parameter)
 try:
  result = int(uid_line.split()[1])
  _log_runtime(parameter, ('%s[Uid]' % status_path), start_time)
  return result
 except:
  exc = IOError(('unable to parse the %s Uid entry: %s' % (status_path, uid_line)))
  _log_failure(parameter, exc)
  raise exc

def uid ( pid ) : ( start_time , parameter ) = ( time . time ( ) , 'uid' ) status_path = ( '/proc/%s/status' % pid ) uid_line = _get_line ( status_path , 'Uid:' , parameter ) try : result = int ( uid_line . split ( ) [ 1 ] ) _log_runtime ( parameter , ( '%s[Uid]' % status_path ) , start_time ) return result except : exc = IOError ( ( 'unable to parse the %s Uid entry: %s' % ( status_path , uid_line ) ) ) _log_failure ( parameter , exc ) raise exc
provides the user id the given process is running under .