David Gonzalez Martin 8e4fc03d1b Modernize std API
2024-03-08 16:35:40 -06:00

12 lines
280 B
Plaintext

const std = #import("std");
const main = fn() *!void {
const pid = try std.os.duplicate_process();
if (pid == 0) {
std.print(bytes = "Hello from child\n");
std.os.exit(exit_code = 0);
} else {
std.print(bytes = "Hello from parent\n");
}
}