DCMD_ALL_SETOWN

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:

DCMD_ALL_GETOWN

devctl(), fcntl() in the QNX Neutrino C Library Reference