See posix_trace_getnext_event.html