css decide

This commit is contained in:
CakeCN
2025-09-15 19:42:57 +08:00
parent 06cbe85db2
commit 7e57bd60c4
2 changed files with 1 additions and 22 deletions

View File

@@ -13,25 +13,6 @@ terminal_bp = Blueprint('terminal', __name__, url_prefix='/vsc-like')
# 存储终端进程
terminals = {}
def start_terminal_process(socket_id):
# 启动一个 bash 终端
process = subprocess.Popen(
['bash'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)
# 监听进程的输出
while True:
output = process.stdout.readline()
if output:
emit('terminal_output', {'data': output}, room=socket_id)
if process.poll() is not None:
break
def start_terminal_process(socket_id):
"""
监听多个子进程的输出,并通过 WebSocket 发给前端