es_exec_arg(_:_:)
Gets the argument at the specified position from a process execution event.
Declaration
func es_exec_arg(_ event: UnsafePointer<es_event_exec_t>, _ index: UInt32) -> es_string_token_tParameters
- event:
The process execution event.
- index:
The zero-based index of the argument to return. Attempting to read an out-of-bounds index — where
index >= es_exec_arg_count()— results in undefined behavior.
Return Value
A string token that contains the argument data and its length.
Discussion
This function doesn’t allocate memory for the returned token; it points to a string token inside of event. Because you don’t own this memory, don’t try to free it.