pub struct EventExec<'a> { /* private fields */ }
Expand description
A process execution event.
Implementations§
Source§impl<'a> EventExec<'a>
impl<'a> EventExec<'a>
Sourcepub fn dyld_exec_path(&self) -> Option<&'a OsStr>
Available on crate feature macos_13_3_0
only.
pub fn dyld_exec_path(&self) -> Option<&'a OsStr>
macos_13_3_0
only.The exec path passed up to dyld, before symlink resolution. This is the path argument
to execve(2)
or posix_spawn(2)
, or the interpreter from the shebang line for scripts run
through the shell script image activator.
Present on version 7 and later.
Sourcepub fn script(&self) -> Option<File<'a>>
Available on crate feature macos_10_15_1
only.
pub fn script(&self) -> Option<File<'a>>
macos_10_15_1
only.Script being executed by interpreter (if present) on version 2 and later, otherwise None.
Warning: This only work if a script was executed directly and not as an argument to the
interpreter (e.g. ./foo.sh
not /bin/sh ./foo.sh
)
Sourcepub fn cwd(&self) -> Option<File<'a>>
Available on crate feature macos_10_15_4
only.
pub fn cwd(&self) -> Option<File<'a>>
macos_10_15_4
only.Current working directory at exec time (if present) on version 3 and later, otherwise None.
Sourcepub fn last_fd(&self) -> Option<i32>
Available on crate feature macos_11_0_0
only.
pub fn last_fd(&self) -> Option<i32>
macos_11_0_0
only.Highest open file descriptor after the exec completed (if present) on version 4 and later, otherwise None.
Sourcepub fn env_count(&self) -> u32
pub fn env_count(&self) -> u32
Get the number of environment variables associated to the EventExec
.
Sourcepub fn fd_count(&self) -> u32
Available on crate feature macos_11_0_0
only.
pub fn fd_count(&self) -> u32
macos_11_0_0
only.Get the number of file descriptors associated to the EventExec
.
Sourcepub fn arg(&self, index: u32) -> Option<&'a OsStr>
pub fn arg(&self, index: u32) -> Option<&'a OsStr>
Get the argument at the specified position on the associated EventExec
.
Sourcepub fn env(&self, index: u32) -> Option<&'a OsStr>
pub fn env(&self, index: u32) -> Option<&'a OsStr>
Get the environment variable at the specified position on the associated EventExec
.
Sourcepub fn fd(&self, index: u32) -> Option<Fd<'a>>
Available on crate feature macos_11_0_0
only.
pub fn fd(&self, index: u32) -> Option<Fd<'a>>
macos_11_0_0
only.Get the file descriptor at the specified position on the associated EventExec
.
Sourcepub fn fds<'event>(&'event self) -> ExecFds<'event, 'a> ⓘ
Available on crate feature macos_11_0_0
only.
pub fn fds<'event>(&'event self) -> ExecFds<'event, 'a> ⓘ
macos_11_0_0
only.Iterator over the file descriptors
Sourcepub fn image_cputype(&self) -> Option<cpu_type_t>
Available on crate feature macos_13_0_0
only.
pub fn image_cputype(&self) -> Option<cpu_type_t>
macos_13_0_0
only.CPU type of the executable image which is being executed, present on version 6 or later.
Sourcepub fn image_cpusubtype(&self) -> Option<cpu_subtype_t>
Available on crate feature macos_13_0_0
only.
pub fn image_cpusubtype(&self) -> Option<cpu_subtype_t>
macos_13_0_0
only.CPU subtype of the executable image, present on version 6 or later.