diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-30 23:00:16 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:17 -0300 |
| commit | 1ab1d412e2768d9fe56a9e97ab60716a6d31063a (patch) | |
| tree | 9bf7ab7193ee2c8fe333d67f1b4d90e9ffed98c7 /test | |
| parent | c27222be8ba77a3a6bdda16978f3001510bde055 (diff) | |
| download | pardes-1ab1d412e2768d9fe56a9e97ab60716a6d31063a.tar.gz pardes-1ab1d412e2768d9fe56a9e97ab60716a6d31063a.zip | |
A second pardes --detach=NAME while NAME runs says "a session named NAME is already running" and exits 1, with no error trace
The second session built its whole core before its bind failed, then
returned an error that main printed with a Zig error-return trace. The
name is now checked first: a live session's socket is said, and the
process exits 1 having made nothing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1306,6 +1306,14 @@ def test(binary, quic=False): # opened is deleted, as an $EDITOR must; one on a file already open # waits on that pane; a session that goes away ends it with 1. with session(binary, root, 'wait') as (client, address): + # A second --detach of a name a live session holds: said, exit 1, + # no Zig error trace. + second_env = {k: v for k, v in os.environ.items() if not k.startswith('PARDES_')} + second_env.update(HOME=str(root), XDG_RUNTIME_DIR=str(root)) + second = subprocess.run([binary, '--detach=wait'], cwd=root, env=second_env, + stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, timeout=20) + assert second.returncode == 1, second + assert second.stderr == b'pardes: a session named wait is already running\n', second.stderr status = dict(line.split(maxsplit=1) for line in client.read('/status').decode().splitlines()) env = {k: v for k, v in os.environ.items() if k != 'PARDES_FORWARD_LOOK'} env.update(PARDES_9P=str(address), PARDES_PANE='1', PARDES_PID=status['pid']) |
