Set the owner of a file descriptor
#include <sys/dcmd_all.h> #define DCMD_ALL_SETOWN __DIOT(_DCMD_ALL, 5, pid_t)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_ALL_SETOWN |
dev_data_ptr | A pointer to a pid_t that specifies the owner. |
n_bytes | sizeof(pid_t) |
dev_info_ptr | NULL |
This command sets the owner of the given file descriptor. Clients usually use the fcntl() cover function to generate this request:
fcntl(fd, F_SETOWN, pid);
The process ID of the owner.
None.
if(devctl(fd, DCMD_ALL_SETOWN, &pid, sizeof pid, NULL) != EOK) { /* Error */ }