Skip to content

Commit 31132df

Browse files
committed
refactor: use normal call on susops start, using renamed detached processes anyways
1 parent 6b39175 commit 31132df

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

app.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -533,21 +533,8 @@ def open_config_file(self, _):
533533
run_susops("config")
534534

535535
def start_proxy(self, _):
536-
"""Start the proxy in a fully detached background session using setsid."""
537-
self.config = self.load_config()
538-
shell = os.environ.get('SHELL', '/bin/bash')
539-
try:
540-
# Launch using bash -lc and detach from UI process
541-
subprocess.Popen([
542-
shell, '-c', f"{script} start"
543-
], stdout=subprocess.DEVNULL,
544-
stderr=subprocess.DEVNULL,
545-
stdin=subprocess.DEVNULL,
546-
preexec_fn=os.setsid,
547-
close_fds=True)
548-
self.timer_check_state()
549-
except Exception as e:
550-
alert_foreground("Error starting proxy", str(e))
536+
output, _ = run_susops("start")
537+
self.timer_check_state()
551538

552539
def stop_proxy(self, _):
553540
ports_flag = "--keep-ports" if not self.config['ephemeral_ports'] else ""

0 commit comments

Comments
 (0)