diff options
Diffstat (limited to 'test/e2e_harness.zig')
| -rw-r--r-- | test/e2e_harness.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/e2e_harness.zig b/test/e2e_harness.zig index a2010c19..7e29476b 100644 --- a/test/e2e_harness.zig +++ b/test/e2e_harness.zig @@ -15,6 +15,7 @@ extern "c" fn forkpty( extern "c" fn execvp(file: [*:0]const u8, argv: [*:null]const ?[*:0]const u8) c_int; extern "c" fn _exit(status: c_int) noreturn; extern "c" fn unsetenv(name: [*:0]const u8) c_int; +extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int; /// Monotonic milliseconds; the harness's only clock (std.time lost /// milliTimestamp in 0.16). @@ -96,6 +97,9 @@ pub const Harness = struct { if (pid == 0) { for ([_][*:0]const u8{ "PARDES_PID", "PARDES_9P", "PARDES_PANE" }) |name| if (unsetenv(name) != 0) _exit(126); + // The app is the process this kills and the terminal it hangs + // up (deinit): no daemon to fork it off and keep it (daemon.zig). + if (setenv("PARDES_DAEMON", "off", 1) != 0) _exit(126); _ = execvp(exe, argv.ptr); _exit(127); } |
