diff options
| author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-06-27 03:09:05 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-04-06 13:55:25 +0200 |
| commit | 18bbb297ebc0dbfe15d80b86d14c348e31ca06d6 (patch) | |
| tree | ced312465af4cbb8502d6717179fac5766c1ae06 /man7/unix.7 | |
| parent | f4ba6a215f6d147f9733722d53dbf735b51d4e81 (diff) | |
| download | man-pages-18bbb297ebc0dbfe15d80b86d14c348e31ca06d6.tar.gz | |
unix.7: Correct example
The example is misleading. It is not a good idea to unlink an
existing socket because we might try to start the server multiple
times. In this case it is preferable to receive an error.
We could add code that removes the socket when the server process
is killed but that would stretch the example too far.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unix.7')
| -rw-r--r-- | man7/unix.7 | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/man7/unix.7 b/man7/unix.7 index 474b4a7aaa..60d633c9cd 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -934,13 +934,6 @@ main(int argc, char *argv[]) int result; char buffer[BUFFER_SIZE]; - /* - * In case the program exited inadvertently on the last run, - * remove the socket. - */ - - unlink(SOCKET_NAME); - /* Create local socket. */ connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0); |
