mirror of
https://github.com/open-webui/open-terminal.git
synced 2026-11-04 08:10:53 +00:00
15 lines
316 B
Python
15 lines
316 B
Python
"""Exec launcher for a supervisor-provided workload cgroup."""
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main():
|
|
cgroup, *command = sys.argv[1:]
|
|
with open(os.path.join(cgroup, "cgroup.procs"), "w") as stream:
|
|
stream.write(str(os.getpid()))
|
|
os.execvp(command[0], command)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|