getpmsg - delivers the next message on a STREAMS pipe
The getpmsg() system call is used to read message from a STREAMS pipe. A message from the pipe is either read into the buffers that are specified by the
bandp arguments, or it is skipped depending on the settings of
getpmsg() is useful in applications dealing with STREAMS pipes where messages have different priority and should be read in different order than they are available.
int[K] - file descriptor associated with the STREAMS pipe
void *[K] - pointer to buffer for control information
void *[K] - pointer to buffer for data
int *[K] - pointer to a variable for indicating the band of the message
int[K] - flags indicating how the messages should be delivered
- K - Originated from kernel-space.
To measure the time taken by the getpmsg syscall.
Example Use Case¶
getpmsg() can be used in applications that read messages from STREAMS pipes. For example, a text editor can use getpmsg() to read messages from a STREAMS pipe and display them in the application window.
Due to the asynchronous nature of STREAMS pipes, it is possible that getpmsg() will read an invalid message, or a message intended for a different application.
This document was automatically generated by OpenAI and needs review. It might not be accurate and might contain errors. The authors of Tracee recommend that the user reads the "events.go" source file to understand the events and their arguments better.