If a user process issues write(2) with 0 as the number of bytes to send a pipe or FIFO, 0 is returned, and, by default, no message is sent down the Stream. However, if a user must send a zero-length message downstream, SNDZERO ioctl(2) can be used to change this default behavior. If SNDZERO is set in the Stream head, write(2) requests of 0 bytes generate a zero-length message and sends the message down the Stream. If SNDZERO is not set, no message is generated and 0 is returned to the user.
The I_GWROPT ioctl(2) is used to get the current write settings.