DCMD_ALL_SETOWN
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Set the owner of a file descriptor
Synopsis:
#include <sys/dcmd_all.h>
#define DCMD_ALL_SETOWN __DIOT(_DCMD_ALL, 5, pid_t)
Arguments to devctl():
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 |
Description:
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);
Input:
The process ID of the owner.
Output:
None.
Example:
if(devctl(fd, DCMD_ALL_SETOWN, &pid, sizeof pid, NULL) != EOK)
{
/* Error */
}
See also:
Page updated: