def process_state(pid):
    status = LocalPath('/proc').join(str(pid), 'status').read()
    m = re.search('^State:\s+[A-Z] \(([a-z]+)\)$', status, re.MULTILINE)
    return m.group(1)
A shorthand for :func:`as_user("root") <plumbum.machines.local.LocalMachine.as_user>`
dataset/ETHPy150Open Yelp/dumb-init/tests/lib/testing.py/process_state--crossover with--dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py/LocalMachine.as_root