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 ...
|
#
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, 1.2, 1.1, 1.0, 0.7, 0.6, 0.5, 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 |
|
#
228:d448bb7283b2 |
| 26-Aug-2017 |
Igor Sysoev |
Removed unused function.
|
#
115:bef7c075837b |
| 05-Jul-2017 |
Igor Sysoev |
Router: processing JSON configuration.
|
#
65:10688b89aa16 |
| 20-Jun-2017 |
Igor Sysoev |
Using new memory pool implementation.
|
#
53:0b10a73d4993 |
| 31-May-2017 |
Igor Sysoev |
Skeleton of router configuration and request processing.
|
#
13:3a52b2c3d3f1 |
| 22-Feb-2017 |
Igor Sysoev |
I/O operations refactoring.
|
#
0:a63ceefd6ab0 |
| 17-Jan-2017 |
Igor Sysoev |
Initial version.
|