syd_exec

Function syd_exec 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn syd_exec( file: *const c_char, argv: *const *const c_char, ) -> c_int
Expand 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:

  1. The file pointer must point to a valid, null-terminated C-style string.

  2. The argv pointer 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.

  3. The memory pointed to by file and argv must 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.