diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-27 14:02:11 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-27 14:02:11 +0300 |
commit | be36cf52c8b092ebb688784a1c10626cac2138d7 (patch) | |
tree | c7b725425e12be5d8aa04114c3436f78726b1db1 /src/nxt_application.c | |
parent | cdfdbc43eb2f6c59bf1b1cf6d71a6afec34d7869 (diff) | |
download | unit-be36cf52c8b092ebb688784a1c10626cac2138d7.tar.gz unit-be36cf52c8b092ebb688784a1c10626cac2138d7.tar.bz2 |
Introducing application 'atexit' hook.
Finalizing Python interpreter.
This closes #65 issue on GitHub.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_application.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c index 49d785e8..2cd3c921 100644 --- a/src/nxt_application.c +++ b/src/nxt_application.c @@ -382,7 +382,18 @@ nxt_app_http_init(nxt_task_t *task, nxt_runtime_t *rt) void -nxt_port_app_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) +nxt_app_quit_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) +{ + if (nxt_app->atexit != NULL) { + nxt_app->atexit(task); + } + + nxt_worker_process_quit_handler(task, msg); +} + + +void +nxt_app_data_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) { size_t dump_size; nxt_buf_t *b; |