The 12th program uses system function from stdlib.h. This function is not available in zig. Zig users are supposed to use std.process.run() and std.process.spawn() functions instead because its more safer. If you really really want to execute commands using shell injection you can pass the string "sh" before the command in argv array (code from blog 11) like .argv = &.{ "sh", "-c", "ls", "-l" }.
Thanks for reading. To be continued.
Top comments (0)