ConnectFlags(), ConnectFlags_r()

Модифицировать флаги соединения

Прототип:

#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 );

Аргументы:

pid
The ID of the process that the connection ID belongs to, or 0 for the current process.
coid
The ID of the connection whose flags you want to modify.
mask
A bitmap that indicates which bits are to be modified in the flags.
bits
The new value of the flags. The flags currently defined include:
_NTO_COF_CLOEXEC
close the connection if the process calls an exec*() function to start a new process.

Библиотека:

libc

Описание:

The ConnectFlags() and ConnectFlags_r() kernel calls modify flags associated with the specified connection. These kernel calls don't block.

Данные функции идентичны за исключением способа возврата ошибок.

You need to initialize the bits that correspond to the flag in both the mask and bits arguments:

Возвращаемое значение:

ConnectFlags()
The previous value of the flags associated with the connection. If an error occurs, the function returns -1 and sets errno.
ConnectFlags_r()
The previous value of the flags associated with the connection. This function does NOT set errno. If an error occurs, the negative of a value from the Errors section is returned.

Коды ошибок:

EBADF
The coid isn't a valid connection ID for the process.
ESRCH
The process ID is invalid.

Классификация:

ЗОСРВ «Нейтрино»

Точка остановки потока
Нет
Обработчик прерываний
Нет
Обработчик сигналов
Да
В потоке
Да

Тематические ссылки:

ConnectAttach(), fcntl()




Предыдущий раздел: Описание API системной библиотеки