History log of /unit/src/nxt_listen_socket.c (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 1.21.0-1, 1.21.0, 1.20.0-1, 1.20.0, 1.19.0-1, 1.19.0, 1.18.0-1, 1.18.0, 1.17.0-1, 1.17.0
# 1451:0a8840921fd0 08-Apr-2020 Valentin Bartenev

Controller: improved handling of unix domain control socket.

One of the ways to detect Unit's startup and subsequent readiness to accept
commands relies on waiting for the control socket file to be

Controller: improved handling of unix domain control socket.

One of the ways to detect Unit's startup and subsequent readiness to accept
commands relies on waiting for the control socket file to be created.
Earlier, it was unreliable due to a race condition between the client's
connect() and the daemon's listen() calls after the socket's bind() call.

Now, unix domain listening sockets are created with a nxt_listen_socket_create()
call as follows:

s = socket();
unlink("path/to/socket.tmp")
bind(s, "path/to/socket.tmp");
listen(s);
rename("path/to/socket.tmp", "path/to/socket");

This eliminates a time-lapse when the socket file is already created but nobody
is listening on it yet, which therefore prevents the condition described above.

Also, it allows reliably detecting whether the socket is being used or simply
wasn't cleaned after the daemon stopped abruptly. A successful connection to
the socket file means the daemon has been started; otherwise, the file can be
overwritten.

show more ...


# 1450:d431a2d91caa 08-Apr-2020 Valentin Bartenev

Controller: fixed cleaning up of control socket file in some cases.

Previously, the unix domain control socket file might have been left
in the file system after a failed nxt_listen_socket_create()

Controller: fixed cleaning up of control socket file in some cases.

Previously, the unix domain control socket file might have been left
in the file system after a failed nxt_listen_socket_create() call.

show more ...


# 1449:8bcb79f5d69d 08-Apr-2020 Valentin Bartenev

Removed unused code related to testing of address binding.


Revision tags: 1.16.0-1, 1.16.0, 1.15.0-1, 1.15.0, 1.14.0-1, 1.14.0, 1.13.0-1, 1.13.0, 1.12.0-1, 1.12.0, 1.11.0-2, 1.11.0-1, 1.11.0, 1.10.0-2, 1.10.0-1, 1.10.0, 1.9.0-1, 1.9.0, 1.8.0-1, 1.8.0, 1.7.1-1, 1.7.1, 1.7-1, 1.7, 1.6-1, 1.6, 1.5-1, 1.5, 1.4-2, 1.4
# 771:f349b2d68e75 20-Sep-2018 Igor Sysoev

Added SSL/TLS support on connection level.


Revision tags: 1.3
# 703:2d536dde84d2 25-Jun-2018 Valentin Bartenev

Introduced nxt_length() macro.


Revision tags: 1.2, 1.1, 1.0, 0.7
# 564:762f8c976ead 05-Mar-2018 Valentin Bartenev

Reduced number of critical log levels.


Revision tags: 0.6, 0.5
# 494:7c83ddcc1c42 24-Jan-2018 Sergey Kandaurov

Fixed formatting in nxt_sprintf() and logging.


# 493:745222d540a2 24-Jan-2018 Sergey Kandaurov

Using size_t for the field width type of the "%*s" specifier.


Revision tags: 0.4, 0.3, 0.2
# 359:d4848619451a 18-Oct-2017 Igor Sysoev

Router: fixed segfault after configuration change.


# 312:c156aea91063 14-Sep-2017 Igor Sysoev

Fixed textual socket name lengths and Unix domain sockaddr length.


Revision tags: 0.1
# 234:e0f17b03f52b 26-Aug-2017 Igor Sysoev

Added configure and command line option --control.


# 229:dbceed548653 26-Aug-2017 Igor Sysoev

Introduced nxt_socket_defer_accept().


# 228:d448bb7283b2 26-Aug-2017 Igor Sysoev

Removed unused function.


# 211:6738bb76ae0a 16-Aug-2017 Ruslan Ermilov

Corrected path to nxt_socket.h in comments.


# 115:bef7c075837b 05-Jul-2017 Igor Sysoev

Router: processing JSON configuration.


# 65:10688b89aa16 20-Jun-2017 Igor Sysoev

Using new memory pool implementation.


# 62:5e1efcc7b740 14-Jun-2017 Igor Sysoev

nxt_event_conn_... functions and structures have been renamed
to nxt_conn_...


# 13:3a52b2c3d3f1 22-Feb-2017 Igor Sysoev

I/O operations refactoring.


# 0:a63ceefd6ab0 17-Jan-2017 Igor Sysoev

Initial version.