nxt_unit_app_test.c (1669:37e2a3ea1bf1) nxt_unit_app_test.c (1676:54d88fe4e8b1)
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_auto_config.h>
7#include <nxt_version.h>
8#include <nxt_unit.h>

--- 58 unchanged lines hidden (view full) ---

67 err = nxt_unit_run(ctx);
68
69 nxt_unit_debug(ctx, "main worker finished with %d code", err);
70
71 if (thread_count > 1) {
72 for (i = 0; i < thread_count - 1; i++) {
73 err = pthread_join(threads[i], NULL);
74
1
2/*
3 * Copyright (C) NGINX, Inc.
4 */
5
6#include <nxt_auto_config.h>
7#include <nxt_version.h>
8#include <nxt_unit.h>

--- 58 unchanged lines hidden (view full) ---

67 err = nxt_unit_run(ctx);
68
69 nxt_unit_debug(ctx, "main worker finished with %d code", err);
70
71 if (thread_count > 1) {
72 for (i = 0; i < thread_count - 1; i++) {
73 err = pthread_join(threads[i], NULL);
74
75 nxt_unit_debug(ctx, "join thread #%d: %d", i, err);
75 if (nxt_fast_path(err == 0)) {
76 nxt_unit_debug(ctx, "join thread #%d", i);
77
78 } else {
79 nxt_unit_alert(ctx, "pthread_join(#%d) failed: %s (%d)",
80 i, strerror(err), err);
81 }
76 }
77
78 nxt_unit_free(ctx, threads);
79 }
80
81 nxt_unit_done(ctx);
82
83 nxt_unit_debug(NULL, "main worker done");

--- 43 unchanged lines hidden (view full) ---

127 nxt_unit_debug(ctx, "start worker");
128
129 rc = nxt_unit_run(ctx);
130
131 nxt_unit_debug(ctx, "worker finished with %d code", rc);
132
133 nxt_unit_done(ctx);
134
82 }
83
84 nxt_unit_free(ctx, threads);
85 }
86
87 nxt_unit_done(ctx);
88
89 nxt_unit_debug(NULL, "main worker done");

--- 43 unchanged lines hidden (view full) ---

133 nxt_unit_debug(ctx, "start worker");
134
135 rc = nxt_unit_run(ctx);
136
137 nxt_unit_debug(ctx, "worker finished with %d code", rc);
138
139 nxt_unit_done(ctx);
140
135 return NULL;
141 return (void *) (intptr_t) rc;
136}
137
138
139static void
140greeting_app_request_handler(nxt_unit_request_info_t *req)
141{
142 int rc;
143 char *p;

--- 134 unchanged lines hidden ---
142}
143
144
145static void
146greeting_app_request_handler(nxt_unit_request_info_t *req)
147{
148 int rc;
149 char *p;

--- 134 unchanged lines hidden ---