#[unsafe(no_mangle)]pub unsafe extern "C" fn syd_exec(
file: *const c_char,
argv: *const *const c_char,
) -> c_intExpand description
Execute a command outside the sandbox without sandboxing
ยงSafety
This function is marked unsafe because it dereferences raw
pointers, which is inherently unsafe in Rust.
The caller must ensure the following conditions are met to safely use this function:
-
The
filepointer must point to a valid, null-terminated C-style string. -
The
argvpointer must point to an array of pointers, where each pointer refers to a valid, null-terminated C-style string. The last pointer in the array must be null, indicating the end of the array. -
The memory pointed to by
fileandargvmust remain valid for the duration of the call.
Failing to uphold these guarantees can lead to undefined behavior, including memory corruption and data races.
Returns 0 on success, negated errno on failure.