Technical data
streamio(7I) Ioctl Requests SunOS 5.5
I_SWROPT Sets the write mode using the value of the argument arg. Legal bit set-
tings for arg are:
SNDZERO Send a zero-length message downstream when a write
of 0 bytes occurs.
To not send a zero-length message when a write of 0 bytes occurs, this
bit must not be set in arg.
On failure, errno may be set to the following value:
EINVAL arg is not the above legal value.
I_GWROPT Returns the current write mode setting, as described above, in the int
that is pointed to by the argument arg.
I_SENDFD Requests the stream associated with fildes to send a message, containing
a file pointer, to the stream head at the other end of a stream pipe. The
file pointer corresponds to arg, which must be an open file descriptor.
I_SENDFD converts arg into the corresponding system file pointer. It
allocates a message block and inserts the file pointer in the block. The
user id and group id associated with the sending process are also
inserted. This message is placed directly on the read queue (see
intro(2)) of the stream head at the other end of the stream pipe to which
it is connected. On failure, errno is set to one of the following values:
EAGAIN The sending stream is unable to allocate a message
block to contain the file pointer.
EAGAIN The read queue of the receivingstream head is full and
cannot accept the message sent by I_SENDFD.
EBADF arg is not a valid, open file descriptor.
EINVAL fildes is not connected to a stream pipe.
ENXIO Hangup received on fildes.
I_RECVFD Retrieves the file descriptor associated with the message sent by an
I_SENDFD ioctl over a stream pipe. arg is a pointer to a data buffer
large enough to hold an strrecvfd data structure containing the follow-
ing members:
int fd;
uid_t uid;
gid_t gid;
fd is an integer file descriptor. uid and gid are the user id and group id,
respectively, of the sendingstream.
If O_NDELAY and O_NONBLOCK are clear (see open(2)), I_RECVFD will
block until a message is present at the stream head. If O_NDELAY or
O_NONBLOCK is set, I_RECVFD will fail with errno set to EAGAIN if no
message is present at the stream head.
If the message at the stream head is a message sent by an I_SENDFD,a
7I-334 modified 24 Jan 1995










