summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 10109bb8..bc122109 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -1737,7 +1737,7 @@ pub fn exportEnv(serial: u32, adopts: bool) void {
const socket: ?[]const u8 = if (own_socket_len > 0) own_socket[0..own_socket_len] else null;
const ChildEnv = @import("host_io.zig").ChildEnv;
var pid_buf: [16]u8 = undefined;
- ChildEnv.exportVar("PARDES_PID", if (adopts) std.fmt.bufPrint(&pid_buf, "{d}", .{@as(u32, @intCast(libc.getpid()))}) catch null else null);
+ ChildEnv.exportVar("PARDES_PID", if (adopts) std.fmt.bufPrint(&pid_buf, "{d}", .{@as(u32, @intCast(libc.getpid()))}) catch unreachable else null); // a u32 fits 16
if (socket) |own| {
var buf: [16]u8 = undefined;
ChildEnv.exportVar("PARDES_9P", own);