Get the PID to which the ``sid`` currently maps.

    Preconditions:
    - ``sid`` is verified to exist. E.g., with d1_gmn.app.views.asserts.is_sid().
177478
def resolve_sid(sid):
    
    return d1_gmn.app.models.Chain.objects.get(sid__did=sid).head_pid.did
1176749
def resolve_pid(fetched_pid):
    
    return PersistentIdentifier.get(
        pid_type=fetched_pid.pid_type,
        pid_value=fetched_pid.pid_value,
        pid_provider=fetched_pid.provider.pid_provider
    )
911186
def running(processid):
    
    try:
        # From kill(2)
        #   If sig is 0 (the null signal), error checking is performed but no
        #   signal is actually sent. The null signal can be used to check the
        #   validity of pid
        os.kill(processid, 0)
    except OverflowError as exc:
        print("checking validity of pid ({p}) failed with: {e}"
              .format(p=processid, e=exc))
        sys.exit(1)
    except OSError:
        return False
    else:
        return True
1018639
def _signal(self, sig, pid=None):
        
        log = self._params.get('log', self._discard)
        if pid is None:
            pids = self.get_pids()
        else:
            pids = [pid]
        for pid in pids:
            try:
                os.kill(pid, sig)
                log.debug("Signalled '%s' pid %d with %s", self._name, pid, utils.signame(sig))
            except Exception as e:
                log.warning("Failed to signal '%s' pid %d with %s -- %s", self._name, pid, utils.signame(sig), e)
740339
def is_valid_pid_to_be_updated(did):
    """"""
    if not d1_gmn.app.did.is_valid_pid_to_be_updated(did):
        raise d1_common.types.exceptions.InvalidRequest(
            0,
            'Object cannot be updated because the identifier for the object to be '
            'updated is {}. did="{}"'.format(
                d1_gmn.app.did.classify_identifier(did), did
            ),
            identifier=did,
        )
1045085
def uid(self):
        
        if not self._uid:
            if self.config.daemon.user:
                self._uid = pwd.getpwnam(self.config.daemon.user).pw_uid
            else:
                self._uid = os.getuid()
        return self._uid
910483
def get(self, sid):
        
        return KeyContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
1315267
def get(self, sid):
        
        return EngagementContext(self._version, flow_sid=self._solution['flow_sid'], sid=sid, )
1055417
def get(self, sid):
        
        return DomainContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
960294
def get(self, sid):
        
        return TriggerContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
421740
def get_sysid(self):
        ''''''
        component = self.target_component
        if component == 0:
            component = 1
        return (self.target_system, component)
768570
def get_sid_info(self,j):
        ''''''
        h = self.gdx_handle
        r, name, dims, stype = gdxcc.gdxSymbolInfo(h, j)
        assert r, '%d is not a valid symbol number' % j
        r, records, userinfo, description = gdxcc.gdxSymbolInfoX(h, j)
        assert r, '%d is not a valid symbol number' % j
        return {'name':name, 'stype':stype, 'desc':description, 'dim':dims}
402685
def map_sid2uid(self, sid, uid):
        
        self.set('sid2uid', sid, uid)
        self.set('uid2sid', uid, sid)
630676
def pid(name):
    '''
    
    '''
    try:
        return int(info(name).get('PID'))
    except (TypeError, ValueError) as exc:
        raise CommandExecutionError(
            'Unable to get PID for container \'{0}\': {1}'.format(name, exc)
        )
912344
def user_to_uid(user):
    '''
    
    '''
    if user is None:
        user = salt.utils.user.get_user()

    return salt.utils.win_dacl.get_sid_string(user)
272056
def pid(self):
        
        pf = self.path('cmd.pid')
        if not os.path.exists(pf):
            return None
        with open(pf, 'r') as f:
            return int(f.read())
638962
def get(self, sid):
        
        return StepContext(
            self._version,
            flow_sid=self._solution['flow_sid'],
            engagement_sid=self._solution['engagement_sid'],
            sid=sid,
        )