STREAMS Programming Guide

Closing the Service Provider

The next routine in the service interface library example is inter_close, which closes the stream to the service provider.


inter_close(fd)
{
 	close(fd);
}

The routine closes the given file descriptor. This causes the protocol driver to free any resources associated with that stream. For example, the driver can unbind the protocol address that had previously been bound to that stream, thereby freeing that address for use by another service user.