Commit Graph

996 Commits

Author SHA1 Message Date
Max Romanov 021a84019f Freed mmap memory filled with 0xA5. 2017-08-02 13:22:03 +03:00
Max Romanov 9367dd2bf8 Implicit port read buffer completion.
To disable implicit completion, handler should reset msg->buf field.
2017-08-02 13:21:32 +03:00
Max Romanov bcf99f87e2 Using port rpc in controller->router configuration update. 2017-08-02 13:20:57 +03:00
Max Romanov 82c0304ab8 Using port rpc in router->master start worker request. 2017-08-02 13:20:53 +03:00
Max Romanov c93d2c7623 Include build/Makefile into main Makefile. 2017-08-02 13:18:04 +03:00
Max Romanov f2e9afdf42 Port RPC interface introduced.
Usage:
1. Register handlers in incoming port with nxt_port_rpc_register_handler().
2. Use return value as a stream identifier for next nxt_port_socket_write().
2017-08-02 13:14:31 +03:00
Max Romanov 3812ffd336 Added bit flags to type parameter of nxt_port_socket_write().
NXT_PORT_MSG_LAST     - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;

Type constants altered to include last flag for single buffer messages.

Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
2017-08-02 13:10:48 +03:00
Max Romanov a7ef8481fc Added make target 'golang-nginext-install' to install precompiled go package. 2017-08-02 13:01:54 +03:00
Max Romanov 83d7ab38ac Using old-style packed attribute specification for compatibility. 2017-08-02 13:01:54 +03:00
Igor Sysoev 145eeb8476 Improved PHP configure test. 2017-07-26 12:17:41 +03:00
Igor Sysoev 237bd6b1c2 Improved Python configure test. 2017-07-26 12:17:32 +03:00
Igor Sysoev 740382e36e Improved Go configure test. 2017-07-26 12:17:27 +03:00
Igor Sysoev d218c5f7b4 Updated Go configure test. 2017-07-25 20:29:02 +03:00
Max Romanov 057c2526ee Assign current request id to prevent port memory release. 2017-07-25 16:18:31 +03:00
Max Romanov 5a756647ff Using engine task to avoid racing condition. 2017-07-25 16:18:31 +03:00
Max Romanov 316c77a9de Fixed building on Solaris by Sun C. 2017-07-25 16:18:31 +03:00
Valentin Bartenev 578cd547c0 Fixed building without debug. 2017-07-21 15:20:45 +03:00
Igor Sysoev 68d35e9157 Fixed a bug introduced in the changeset 9585902ff351. 2017-07-19 23:11:55 +03:00
Igor Sysoev a782faa499 Listening sockets remaining from the previous configuration
were not updated with new parameters.
2017-07-19 22:36:03 +03:00
Igor Sysoev ba6c8e51be The master process title has been renamed to "main" process.
The command line is enclosed in brackets.
2017-07-19 15:22:40 +03:00
Igor Sysoev 0d7af2adf7 Removed "process" word from process title. 2017-07-19 10:49:46 +03:00
Igor Sysoev 21de5c1d18 Added application name in process title. 2017-07-18 22:27:13 +03:00
Valentin Bartenev ee5b018cc2 Configuration: improved declaration of short strings. 2017-07-18 18:00:19 +03:00
Valentin Bartenev a6c4ef7a10 Configuration: reduced memory consumption of long strings. 2017-07-18 18:00:19 +03:00
Valentin Bartenev f16510585f Configuration: reduced memory consumption. 2017-07-18 18:00:15 +03:00
Igor Sysoev 9183ea3f71 Fixed building by Clang. 2017-07-18 18:04:17 +03:00
Valentin Bartenev 9d707800b0 More accurate "packed" attribute declaration. 2017-07-18 17:13:40 +03:00
Valentin Bartenev beb4de21bb Removed NXT_PACKED from port structures.
That was added only to silence Valgrind, but it results in
unaligned access (which breaks Unit on ARM architecture).
2017-07-18 17:12:46 +03:00
Max Romanov 6b6fefa497 Request-app link introduced to prevent mp destroy for penging requests.
nxt_req_conn_link_t still used for lookup connection by request id.
New nxt_req_app_link_t (ra) allocated from conn->mem_pool using mp_retain().
ra stored in app->requests if there is no free worker to process request.
2017-07-18 00:21:28 +03:00
Max Romanov 31e5992f88 Using correct task for engine post. 2017-07-18 00:21:18 +03:00
Max Romanov 8ad2c3fd3a Work queue thread assertions. Reset thread after fork. 2017-07-18 00:21:17 +03:00
Max Romanov 803855138c Mem pool cleanup introduced.
Used for connection mem pool cleanup, which can be used by buffers.
Used for port mem pool to safely destroy linked process.
2017-07-18 00:21:16 +03:00
Max Romanov eb675f2d78 Port allocation and destroy changed. Worker process stop introduced. 2017-07-18 00:21:14 +03:00
Max Romanov 47b359388c Python: typo fixed in string processing shortcut. 2017-07-18 00:21:13 +03:00
Igor Sysoev dbe6862395 Fixed building by Clang. 2017-07-16 19:56:59 +03:00
Igor Sysoev 6fc7b70646 Router configuration retention count fixed. 2017-07-16 19:56:09 +03:00
Igor Sysoev 6044e6f44f Router: joint must be added to engine's joint list in the
engine thread.
2017-07-16 19:55:56 +03:00
Ruslan Ermilov ca3b1b898a Restored arc4random unit test after 59fc46dd5e1d. 2017-07-14 20:37:28 +03:00
Igor Sysoev e134efcb9c Thread pools: various fixes. 2017-07-14 20:34:43 +03:00
Igor Sysoev b3464d563e Router: joint must be checked before memory pool destruction. 2017-07-14 20:34:38 +03:00
Igor Sysoev b5d0920491 Router: listening socket configuration retention count fixed. 2017-07-14 20:34:33 +03:00
Igor Sysoev 3ed35d725a Router: using joint job queues instead of arrays to pass
listening socket handlers to worker engines.
2017-07-14 17:17:15 +03:00
Igor Sysoev 668aabac3c Router: using joint jobs to pass listening socket handlers to
worker engines.
2017-07-14 17:17:15 +03:00
Valentin Bartenev d669045b75 Fixed the previous commit. 2017-07-14 17:03:01 +03:00
Valentin Bartenev a937047cb8 Null-terminated user and group. 2017-07-14 16:08:21 +03:00
Igor Sysoev daaa216e2f Using correct task for connection initialization. 2017-07-13 22:44:46 +03:00
Igor Sysoev c5d791d0c4 Router: restoring listening sockets of the previous configuration. 2017-07-13 16:48:28 +03:00
Igor Sysoev 0324d51b8d Closing new listening sockets on configuration failure. 2017-07-12 21:21:00 +03:00
Valentin Bartenev 2be31e2ed6 Fixed style and building with NXT_DEBUG_MEMORY after 3578a7b7ace4. 2017-07-12 20:57:18 +03:00
Max Romanov 288fa85431 Array elements reallocation fixed. 2017-07-12 20:32:22 +03:00