-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_wine_sid.py
More file actions
22 lines (19 loc) · 782 Bytes
/
Copy pathtest_wine_sid.py
File metadata and controls
22 lines (19 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import subprocess
import os
import time
import psutil
env = os.environ.copy()
env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = "/home/cachyos/.local/share/Steam"
env["STEAM_COMPAT_DATA_PATH"] = "/tmp/proton_test_prefix"
p = subprocess.Popen(["/usr/share/steam/compatibilitytools.d/proton-cachyos-slr/proton", "run", "cmd.exe", "/c", "timeout 15"], env=env, start_new_session=True)
time.sleep(2)
sid = os.getsid(p.pid)
print(f"Parent SID: {sid}")
for proc in psutil.process_iter(['pid', 'name', 'cmdline']):
try:
if 'cmd.exe' in proc.name() or 'wineserver' in proc.name() or 'timeout' in proc.name():
proc_sid = os.getsid(proc.pid)
print(f"Proc: {proc.name()} | PID: {proc.pid} | SID: {proc_sid} | ParentSID: {sid}")
except:
pass
p.wait()