14 lines
445 B
Python
14 lines
445 B
Python
"""Inspect only processes under this row's worktree; no unrelated argv/env."""
|
|
from pathlib import Path
|
|
import os,sys
|
|
root='/mnt/storage/src/mosaic-stack-rocko-108';busy=[]
|
|
for p in Path('/proc').iterdir():
|
|
if not p.name.isdigit():continue
|
|
try:
|
|
cwd=os.readlink(p/'cwd')
|
|
if cwd==root or cwd.startswith(root+'/'):
|
|
busy.append((int(p.name),(p/'comm').read_text().strip(),cwd))
|
|
except OSError:pass
|
|
print('busy:',busy)
|
|
sys.exit(bool(busy))
|