dupfd_getinfo()

QNX SDP8.0C Library ReferenceAPIDeveloper

Fetch the information registered by calling dupfd_register()

Synopsis:

#include <sys/dupfd.h>

dupfd_getinfo( dupfd_handle_t handle,
               pid64_t * const peerpidp,
               pid_t * const srvpidp,
               struct _msg_info_hdr * const infop );

Arguments:

handle
The handle to get information for. This handle represents a file descriptor.
peerpidp
A pointer to a pid64_t that is updated with the 64-bit process ID (PID) of the peer process. When the process that registered the file descriptor calls dupfd_getinfo(), this is the PID of the intended recipient of the handle. If the recipient process makes the call, it's the PID of the registering process.
srvpidp
A pointer to a pid_t that is updated with the PID of the server process associated with the handle.
infop
A pointer to a structure that is filled in with information about the file descriptor to duplicate.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The dupfd_getinfo() function fetches the information that is registered by calling dupfd_register(). It can be only called by the process that registered the file descriptor or the intended recipient of the handle.

Returns:

0 on success, or -1 if an error occurred (errno is set).

Errors:

ENOENT
The handle is not valid.
EFAULT
The address specified by the infop pointer is invalid.

Classification:

QNX OS

Safety:
Cancellation pointNo
Signal handlerYes
ThreadYes
Page updated: