Skip to content

Commit

Permalink
std::process: use simple parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Feb 15, 2024
1 parent c61da50 commit 6b09c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/process/cmd_unix.jule
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ fn str_slice_to_cstr_slice(s: []str): []*integ::Char {
fn execvp(file: str, argv: []str): int {
let cargv = str_slice_to_cstr_slice(argv)
unsafe {
ret integ::emit[int]("execvp({}, (char*const*){})", (*integ::Char)(&file[0]), &cargv[0])
ret integ::emit[int]("execvp({}, {})", (*integ::Char)(&file[0]), &cargv[0])
}
}

fn execve(file: str, argv: []str, env: []str): int {
let cargv = str_slice_to_cstr_slice(argv)
let cenv = str_slice_to_cstr_slice(env)
unsafe {
ret integ::emit[int]("execve({}, (char*const*){}, (char*const*)({}))", (*integ::Char)(&file[0]), &cargv[0], &cenv[0])
ret integ::emit[int]("execve({}, {}, {})", (*integ::Char)(&file[0]), &cargv[0], &cenv[0])
}
}

Expand Down

0 comments on commit 6b09c02

Please sign in to comment.