[Previous] [Contents] [Next]

ConnectFlags(), ConnectFlags_r()

Modify flags associated with fd

Synopsis:

#include <sys/neutrino.h>

int ConnectFlags( pid_t pid,
                  int coid, 
                  unsigned mask, 
                  unsigned bits );

int ConnectFlags_r( pid_t pid,
                    int coid, 
                    unsigned mask, 
                    unsigned bits );

Library:

libc

Description:

The ConnectFlags() and ConnectFlags_r() kernel calls modify flags associated with fd. These kernel calls don't block. The ConnectFlags() and ConnectFlags_r() functions are identical except in the way they indicate errors. See the Returns section for details.

Flags currently defined include:

_NTO_COF_CLOEXEC
Close the connection if the process calls an exec*() function to start a new process.

Returns:

The only difference between these functions is the way they indicate errors:

ConnectFlags()
If an error occurs, -1 is returned and errno is set.
ConnectFlags_r()
The previous value of the flags field (which currently is only _NTO_COF_CLOEXEC). This function does NOT set errno. If an error occurs, the negative of a value from the Errors section is returned.

Errors:

ESRCH
The process ID is invalid or the connection ID can't be found.

Classification:

QNX 6

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

ConnectAttach(), fcntl()


[Previous] [Contents] [Next]