Hey everyone, I just finished going through ziglings and I'm trying to write some code, but I'm really struggling with getting the compiler happy.
I'm trying to call std.posix.execveZ and spawn a new zsh process. My issue is about what I need to pass to child_argv. I've tried several things like the following example, and different things that I don't have saved, but I just can't get the compiler to accept this, and surprisingly I haven't found any example online either.
const argv = [_:null]?[*:0]u8{"/usr/bin/zsh"};
_ = std.posix.execveZ(
"/usr/bin/zsh",
&argv,
null,
);
execveZ has this definition: pub fn execveZ( path: [*:0]const u8, child_argv: [*:null]const ?[*:0]const u8, envp: [*:null]const ?[*:0]const u8, ) ExecveError, so what do I need to write for child_argv?
really?