summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_unit.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-31Node.js: added async request execution.Alexander Borisov1-2/+1
2018-10-02Filling cmsghdr with 0 to pass Go 1.11 message validation.Max Romanov1-4/+5
2018-10-02Making port fd blocking on app side and non-blocking in Unit.Max Romanov1-1/+10
This issue was introduced in libunit commit (e0f0cd7d244a). All port sockets in application should be in blocking mode whereas Unit itself operates non-blocking sockets. Having non-blocking sockets in application may cause send error during intensive response packets generation. See https://mailman.nginx.org/pipermail/unit/2018-October/000080.html.
2018-08-07Removing non-required warning.Max Romanov1-5/+0
2018-08-07Improved 'invalid file descriptor' diagnostic.Max Romanov1-0/+14
Unit router process may send mmap file decritptor to the application process for further information exchange. During this process there may be various errors, which should be described in application error log. If file descriptor cannot be properly transferred with 'new mmap' message, fd variable will be assigned to -1 and further syscalls using this file descriptor will fail. For 'new port' message fd is checked in the same way. This commit adds early 'invalid file descriptor' diagnostic and write corresponding message to error log. Found by Coverity (CID 308515).
2018-08-07Fixed unit library mutex usage.Max Romanov1-0/+6
For the optimization purpose, function nxt_unit_remove_process() expects lib->mutex to be locked. The function then moves ports queue into temporary queue and releases mutex. In nxt_unit_done() there were two errors: mutex was not locked before nxt_unit_remove_process() call and mutex was not destroyed. It is hard to tell what was possible negative impact of this errors. Found by Coverity (CID 308517).
2018-08-06Unit application library.Max Romanov1-0/+3630
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.