summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_external.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-10-28Preserving the app port write socket.Max Romanov1-1/+7
The socket is required for intercontextual communication in multithreaded apps.
2020-08-11Moving file descriptor blocking to libunit.Max Romanov1-2/+0
The default libunit behavior relies on blocking the recv() call for port file descriptors, which an application may override if needed. For external applications, port file descriptors were toggled to blocking mode before the exec() call. If the exec() call failed, descriptor remained blocked, so the process hanged while trying to read from it. This patch moves file descriptor mode switch inside libunit.
2020-08-11Libunit refactoring: port management.Max Romanov1-2/+12
- Changed the port management callbacks to notifications, which e. g. avoids the need to call the libunit function - Added context and library instance reference counts for a safer resource release - Added the router main port initialization
2020-05-28Added "rootfs" feature.Tiago Natel de Moura1-0/+2
2020-03-09Refactor of process management.Tiago Natel de Moura1-5/+6
The process abstraction has changed to: setup(task, process) start(task, process_data) prefork(task, process, mp) The prefork() occurs in the main process right before fork. The file src/nxt_main_process.c is completely free of process specific logic. The creation of a process now supports a PROCESS_CREATED state. The The setup() function of each process can set its state to either created or ready. If created, a MSG_PROCESS_CREATED is sent to main process, where external setup can be done (required for rootfs under container). The core processes (discovery, controller and router) doesn't need external setup, then they all proceeds to their start() function straight away. In the case of applications, the load of the module happens at the process setup() time and The module's init() function has changed to be the start() of the process. The module API has changed to: setup(task, process, conf) start(task, data) As a direct benefit of the PROCESS_CREATED message, the clone(2) of processes using pid namespaces now doesn't need to create a pipe to make the child block until parent setup uid/gid mappings nor it needs to receive the child pid.
2019-12-24Adding "limits/shm" configuration validation and parsing.Max Romanov1-2/+2
2019-02-28Introducing Java Servlet Container beta.Max Romanov1-0/+1
2018-10-09Renamed "go" application type to "external".Valentin Bartenev1-21/+24
There's nothing specific to Go language. This type of application object can be used to run any external application that utilizes libunit API.
2018-08-06Unit application library.Max Romanov1-24/+15
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
2018-06-06Go: specifying command line arguments to the executable.Valentin Bartenev1-2/+53
This closes #110 issue on GitHub.
2018-04-04Changed version processing for modules.Alexander Borisov1-1/+1
2018-03-05Reduced number of critical log levels.Valentin Bartenev1-10/+5
2017-12-28Removed duplicate declaration.Igor Sysoev1-1/+1
2017-12-27Introducing application 'atexit' hook.Max Romanov1-0/+1
Finalizing Python interpreter. This closes #65 issue on GitHub.
2017-12-13Introducing Unit version check in Go package.Max Romanov1-35/+67
To communicate with the Go program, Unit setup environment variable named NXT_GO_PORTS with value contains Unit version, stream id to confirm application is started, and Unit ports information. Go Unit package parses this string and compares runtime version with compile time version. In case of parse error or version mismatch, ListenAndServe() returns with the error.
2017-09-06Style fixes.Igor Sysoev1-3/+3
2017-09-05Using CSTRZ mapping type for go executable.Max Romanov1-8/+4
2017-08-31Introduced module compatibility vector.Igor Sysoev1-0/+2
2017-08-29The master process has been renamed to the main process.Igor Sysoev1-1/+1
2017-08-17The new module configuration interface.Igor Sysoev1-92/+3
Configuration and building example: ./configure ./configure python ./configure php ./configure go make all or ./configure make nginext ./configure python make python ./configure php make php ./configure go make go Modules configuration options and building examples: ./configure python --module=python2 --config=python2.7-config make python2 ./configure php --module=php7 --config=php7.0-config --lib-path=/usr/local/php7.0 make php7 ./configure go --go=go1.6 --go-path=${HOME}/go1.6 make go1.6
2017-08-11Request body read state implemented.Max Romanov1-1/+8
With specific timeout and buffer size settings.
2017-07-12Go: worker initialization. READY message to master.Max Romanov1-72/+51
2017-07-05Complex target parser copied from NGINX.Max Romanov1-2/+7
nxt_app_request_header_t fields renamed: - 'path' renamed to 'target'. - 'path_no_query' renamed to 'path' and contains parsed value.
2017-06-23External Go app request processing.Max Romanov1-0/+205