unix.4 (0bd8eb3e08d9720ee3814b29da16a9fd0044c83f) unix.4 (bfd03046d18776ea70785ca1ef36dfc60822de3b)
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
1.\" Copyright (c) 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 11 unchanged lines hidden (view full) ---

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd February 1, 2022
28.Dd October 31, 2024
29.Dt UNIX 4
30.Os
31.Sh NAME
32.Nm unix
33.Nd UNIX-domain protocol family
34.Sh SYNOPSIS
35.In sys/types.h
36.In sys/un.h

--- 35 unchanged lines hidden (view full) ---

72.Xr bind 2
73causes a socket file to be created in the file system.
74This file is
75.Em not
76removed when the socket is closed \(em
77.Xr unlink 2
78must be used to remove the file.
79.Pp
29.Dt UNIX 4
30.Os
31.Sh NAME
32.Nm unix
33.Nd UNIX-domain protocol family
34.Sh SYNOPSIS
35.In sys/types.h
36.In sys/un.h

--- 35 unchanged lines hidden (view full) ---

72.Xr bind 2
73causes a socket file to be created in the file system.
74This file is
75.Em not
76removed when the socket is closed \(em
77.Xr unlink 2
78must be used to remove the file.
79.Pp
80Prior to binding a socket,
81.Xr fchmod 2
82can be used to set the permissions of the socket file.
83This avoids the race that would otherwise occur between creation of the file
84and a subsequent call to
85.Xr chmod 2 .
86Once the socket is bound to a file name, the permissions of the file can not be
87changed this way.
88.Pp
80The length of
81.Ux Ns -domain
82address, required by
83.Xr bind 2
84and
85.Xr connect 2 ,
86can be calculated by the macro
87.Fn SUN_LEN

--- 348 unchanged lines hidden (view full) ---

436size limit.
437A side effect of the implementation is that it doesn't guarantee
438that writes from different senders will arrive at the receiver in the same
439chronological order they were sent.
440The order is preserved for writes coming through a particular connection.
441.Sh SEE ALSO
442.Xr connect 2 ,
443.Xr dup 2 ,
89The length of
90.Ux Ns -domain
91address, required by
92.Xr bind 2
93and
94.Xr connect 2 ,
95can be calculated by the macro
96.Fn SUN_LEN

--- 348 unchanged lines hidden (view full) ---

445size limit.
446A side effect of the implementation is that it doesn't guarantee
447that writes from different senders will arrive at the receiver in the same
448chronological order they were sent.
449The order is preserved for writes coming through a particular connection.
450.Sh SEE ALSO
451.Xr connect 2 ,
452.Xr dup 2 ,
453.Xr fchmod 2 ,
444.Xr fcntl 2 ,
445.Xr getsockopt 2 ,
446.Xr listen 2 ,
447.Xr recvmsg 2 ,
448.Xr sendto 2 ,
449.Xr setsockopt 2 ,
450.Xr socket 2 ,
451.Xr CMSG_DATA 3 ,

--- 12 unchanged lines hidden ---
454.Xr fcntl 2 ,
455.Xr getsockopt 2 ,
456.Xr listen 2 ,
457.Xr recvmsg 2 ,
458.Xr sendto 2 ,
459.Xr setsockopt 2 ,
460.Xr socket 2 ,
461.Xr CMSG_DATA 3 ,

--- 12 unchanged lines hidden ---