Changeset 247:d5fd9e46d3d3 for uwsgi.c
Legend:
- Unmodified
- Added
- Removed
-
uwsgi.c
r246 r247 175 175 void internal_server_error (int fd, char *message) { 176 176 #ifndef UNBIT 177 if (uwsgi. options[UWSGI_OPTION_CGI_MODE] == 0) {177 if (uwsgi.shared->options[UWSGI_OPTION_CGI_MODE] == 0) { 178 178 #endif 179 179 wsgi_req.headers_size = write (fd, "HTTP/1.1 500 Internal Server Error\r\nContent-type: text/html\r\n\r\n", 63); … … 198 198 len = PyString_Size (data); 199 199 #ifndef ROCK_SOLID 200 if (uwsgi.has_threads && uwsgi. options[UWSGI_OPTION_THREADS] == 1) {200 if (uwsgi.has_threads && uwsgi.shared->options[UWSGI_OPTION_THREADS] == 1) { 201 201 Py_BEGIN_ALLOW_THREADS wsgi_req.response_size = write (uwsgi.poll.fd, content, len); 202 202 Py_END_ALLOW_THREADS} … … 260 260 261 261 #ifndef UNBIT 262 if (uwsgi. options[UWSGI_OPTION_CGI_MODE] == 0) {262 if (uwsgi.shared->options[UWSGI_OPTION_CGI_MODE] == 0) { 263 263 base = 4; 264 264 #endif … … 480 480 int rlen; 481 481 482 #ifdef UWSGI_NAGIOS 483 int nagios = 0 ; 484 #endif 485 482 486 #ifdef UWSGI_SCTP 483 487 int i_am_sctp = 0; … … 486 490 487 491 char *udp_socket = NULL; 488 struct pollfd u dp_poll;492 struct pollfd uwsgi_poll; 489 493 struct sockaddr_in udp_client; 490 494 socklen_t udp_len; … … 523 527 memset (&uwsgi, 0, sizeof (struct uwsgi_server)); 524 528 525 /* shared area for dynamic options*/526 uwsgi. options = (uint32_t *) mmap (NULL, sizeof (uint32_t) * (0xFF + 1), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);527 if (!uwsgi. options) {529 /* generic shared area */ 530 uwsgi.shared = (struct uwsgi_shared *) mmap (NULL, sizeof (struct uwsgi_shared), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); 531 if (!uwsgi.shared) { 528 532 perror ("mmap()"); 529 533 exit (1); 530 534 } 531 memset (uwsgi.options, 0, sizeof (uint32_t) * (0xFF + 1)); 532 533 /* hooks */ 534 uwsgi.hooks = mmap (NULL, sizeof (void *) * (0xFF + 1), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); 535 if (!uwsgi.hooks) { 536 perror ("mmap()"); 537 exit (1); 538 } 539 memset (uwsgi.hooks, 0, sizeof (void *) * (0xFF + 1)); 540 541 /* hooks */ 542 uwsgi.after_hooks = mmap (NULL, sizeof (void *) * (0xFF + 1), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); 543 if (!uwsgi.after_hooks) { 544 perror ("mmap()"); 545 exit (1); 546 } 547 memset (uwsgi.after_hooks, 0, sizeof (void *) * (0xFF + 1)); 535 memset (uwsgi.shared, 0, sizeof (struct uwsgi_shared)); 548 536 549 537 for(i=0;i<0xFF;i++) { 550 uwsgi. hooks[i] = unconfigured_hook;551 uwsgi. after_hooks[i] = unconfigured_after_hook;538 uwsgi.shared->hooks[i] = unconfigured_hook; 539 uwsgi.shared->after_hooks[i] = unconfigured_after_hook; 552 540 } 553 541 … … 564 552 uwsgi.vec_size = 4 + 1 + (4 * MAX_VARS); 565 553 566 uwsgi. options[UWSGI_OPTION_SOCKET_TIMEOUT] = 4;567 uwsgi. options[UWSGI_OPTION_LOGGING] = 1;554 uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT] = 4; 555 uwsgi.shared->options[UWSGI_OPTION_LOGGING] = 1; 568 556 569 557 #ifndef UNBIT … … 613 601 {"erlang", required_argument, 0, LONG_ARGS_ERLANG}, 614 602 {"erlang-cookie", required_argument, 0, LONG_ARGS_ERLANG_COOKIE}, 603 {"nagios", no_argument, &nagios, 1}, 615 604 {0, 0, 0, 0} 616 605 }; … … 684 673 #ifndef UNBIT 685 674 #ifndef ROCK_SOLID 686 if (uwsgi. options[UWSGI_OPTION_CGI_MODE] == 0) {675 if (uwsgi.shared->options[UWSGI_OPTION_CGI_MODE] == 0) { 687 676 #endif 688 677 #endif … … 717 706 } 718 707 #ifdef __linux__ 719 if (uwsgi. options[UWSGI_OPTION_MEMORY_DEBUG]) {708 if (uwsgi.shared->options[UWSGI_OPTION_MEMORY_DEBUG]) { 720 709 fprintf (stderr, "*** Warning, on linux system you have to bind-mount the /proc fs in your chroot to get memory debug/report.\n"); 721 710 } … … 783 772 fprintf (stderr, "your memory page size is %d bytes\n", uwsgi.page_size); 784 773 785 #ifndef UNBIT786 fprintf (stderr, "your server socket listen backlog is limited to %d connections\n", uwsgi.listen_queue);787 #endif788 774 789 775 if (uwsgi.synclog) { … … 977 963 } 978 964 965 #endif 966 967 if (uwsgi.buffer_size > 65536) { 968 fprintf (stderr, "invalid buffer size.\n"); 969 exit (1); 970 } 971 uwsgi.buffer = malloc (uwsgi.buffer_size); 972 if (uwsgi.buffer == NULL) { 973 fprintf (stderr, "unable to allocate memory for buffer.\n"); 974 exit (1); 975 } 976 977 fprintf (stderr, "request/response buffer (%d bytes) allocated.\n", uwsgi.buffer_size); 978 979 #ifdef UWSGI_NAGIOS 980 if (nagios) { 981 // connect and send 982 if (uwsgi.socket_name == NULL) { 983 fprintf(stdout,"UWSGI UNKNOWN: you have specified an invalid socket\n"); 984 exit(3); 985 } 986 char *tcp_port = strchr (uwsgi.socket_name, ':'); 987 if (tcp_port == NULL) { 988 fprintf(stdout,"UWSGI UNKNOWN: you have specified an invalid socket\n"); 989 exit(3); 990 } 991 992 tcp_port[0] = 0 ; 993 994 uwsgi_poll.fd = connect_to_tcp(uwsgi.socket_name, atoi(tcp_port+1), uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT]); 995 if (uwsgi_poll.fd < 0) { 996 fprintf(stdout,"UWSGI CRITICAL: could not connect() to workers\n"); 997 exit(2); 998 } 999 wsgi_req.modifier = UWSGI_MODIFIER_PING ; 1000 wsgi_req.size = 0 ; 1001 wsgi_req.modifier_arg = 0 ; 1002 if (write(uwsgi_poll.fd, &wsgi_req, 4) != 4) { 1003 perror("write()"); 1004 fprintf(stdout,"UWSGI CRITICAL: could not send ping packet to workers\n"); 1005 exit(2); 1006 } 1007 uwsgi_poll.events = POLLIN ; 1008 if (!uwsgi_parse_response (&uwsgi_poll, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT], (struct uwsgi_header *) &wsgi_req, uwsgi.buffer)) { 1009 fprintf(stdout,"UWSGI CRITICAL: timed out waiting for response\n"); 1010 exit(2); 1011 } 1012 else { 1013 if (wsgi_req.size > 0) { 1014 fprintf(stdout,"UWSGI WARNING: %.*s\n", wsgi_req.size, uwsgi.buffer); 1015 exit(1); 1016 } 1017 else { 1018 fprintf(stdout,"UWSGI OK: armed and ready\n"); 1019 exit(0); 1020 } 1021 } 1022 1023 // never here 1024 fprintf(stdout,"UWSGI UNKNOWN: probably you hit a bug of uWSGI !!!\n"); 1025 exit(3); 1026 1027 } 979 1028 #endif 980 1029 … … 1022 1071 1023 1072 1073 #ifndef UNBIT 1074 fprintf (stderr, "your server socket listen backlog is limited to %d connections\n", uwsgi.listen_queue); 1075 #endif 1076 1024 1077 1025 1078 if (uwsgi.single_interpreter == 1) { … … 1061 1114 #endif 1062 1115 1063 if (uwsgi.buffer_size > 65536) {1064 fprintf (stderr, "invalid buffer size.\n");1065 exit (1);1066 }1067 uwsgi.buffer = malloc (uwsgi.buffer_size);1068 if (uwsgi.buffer == NULL) {1069 fprintf (stderr, "unable to allocate memory for buffer.\n");1070 exit (1);1071 }1072 1073 fprintf (stderr, "request/response buffer (%d bytes) allocated.\n", uwsgi.buffer_size);1074 1116 1075 1117 /* save the masterpid */ … … 1078 1120 fprintf(stderr,"initializing hooks..."); 1079 1121 1080 uwsgi. hooks[0] = uwsgi_request_wsgi ;1081 uwsgi. after_hooks[0] = uwsgi_after_request_wsgi ;1082 1083 uwsgi. hooks[UWSGI_MODIFIER_ADMIN_REQUEST] = uwsgi_request_admin ; //101122 uwsgi.shared->hooks[0] = uwsgi_request_wsgi ; 1123 uwsgi.shared->after_hooks[0] = uwsgi_after_request_wsgi ; 1124 1125 uwsgi.shared->hooks[UWSGI_MODIFIER_ADMIN_REQUEST] = uwsgi_request_admin ; //10 1084 1126 #ifdef UWSGI_SPOOLER 1085 uwsgi. hooks[UWSGI_MODIFIER_SPOOL_REQUEST] = uwsgi_request_spooler ; //171086 #endif 1087 uwsgi. hooks[UWSGI_MODIFIER_FASTFUNC] = uwsgi_request_fastfunc ; //261088 1089 uwsgi. hooks[UWSGI_MODIFIER_MANAGE_PATH_INFO] = uwsgi_request_wsgi ; // 301090 uwsgi. after_hooks[UWSGI_MODIFIER_MANAGE_PATH_INFO] = uwsgi_after_request_wsgi; // 301091 1092 uwsgi. hooks[UWSGI_MODIFIER_MESSAGE_MARSHAL] = uwsgi_request_marshal ; //331093 uwsgi. hooks[UWSGI_MODIFIER_PING] = uwsgi_request_ping ; //1001127 uwsgi.shared->hooks[UWSGI_MODIFIER_SPOOL_REQUEST] = uwsgi_request_spooler ; //17 1128 #endif 1129 uwsgi.shared->hooks[UWSGI_MODIFIER_FASTFUNC] = uwsgi_request_fastfunc ; //26 1130 1131 uwsgi.shared->hooks[UWSGI_MODIFIER_MANAGE_PATH_INFO] = uwsgi_request_wsgi ; // 30 1132 uwsgi.shared->after_hooks[UWSGI_MODIFIER_MANAGE_PATH_INFO] = uwsgi_after_request_wsgi; // 30 1133 1134 uwsgi.shared->hooks[UWSGI_MODIFIER_MESSAGE_MARSHAL] = uwsgi_request_marshal ; //33 1135 uwsgi.shared->hooks[UWSGI_MODIFIER_PING] = uwsgi_request_ping ; //100 1094 1136 1095 1137 fprintf(stderr,"done.\n"); … … 1168 1210 #ifdef UWSGI_SPOOLER 1169 1211 if (spool_dir != NULL) { 1170 uwsgi. workers[0].spooler_pid = spooler_start (uwsgi.serverfd, uwsgi_module);1212 uwsgi.shared->spooler_pid = spooler_start (uwsgi.serverfd, uwsgi_module); 1171 1213 } 1172 1214 #endif … … 1236 1278 1237 1279 if (udp_socket) { 1238 u dp_poll.fd = bind_to_udp (udp_socket);1239 if (u dp_poll.fd < 0) {1280 uwsgi_poll.fd = bind_to_udp (udp_socket); 1281 if (uwsgi_poll.fd < 0) { 1240 1282 fprintf (stderr, "unable to bind to udp socket. SNMP and cluster management services will be disabled.\n"); 1241 1283 } 1242 1284 else { 1243 1285 fprintf (stderr, "UDP server enabled.\n"); 1244 u dp_poll.events = POLLIN;1286 uwsgi_poll.events = POLLIN; 1245 1287 } 1246 1288 } … … 1248 1290 if (ready_to_die >= uwsgi.numproc && uwsgi.to_hell) { 1249 1291 #ifdef UWSGI_SPOOLER 1250 if (spool_dir && uwsgi. workers[0].spooler_pid > 0) {1251 kill (uwsgi. workers[0].spooler_pid, SIGKILL);1252 fprintf(stderr,"killed the spooler with pid %d\n", uwsgi. workers[0].spooler_pid);1292 if (spool_dir && uwsgi.shared->spooler_pid > 0) { 1293 kill (uwsgi.shared->spooler_pid, SIGKILL); 1294 fprintf(stderr,"killed the spooler with pid %d\n", uwsgi.shared->spooler_pid); 1253 1295 } 1254 1296 … … 1259 1301 if (ready_to_reload >= uwsgi.numproc && uwsgi.to_heaven) { 1260 1302 #ifdef UWSGI_SPOOLER 1261 if (spool_dir && uwsgi. workers[0].spooler_pid > 0) {1262 kill (uwsgi. workers[0].spooler_pid, SIGKILL);1263 fprintf(stderr,"wait4() the spooler with pid %d...", uwsgi. workers[0].spooler_pid);1264 diedpid = waitpid(uwsgi. workers[0].spooler_pid, &waitpid_status, 0);1303 if (spool_dir && uwsgi.shared->spooler_pid > 0) { 1304 kill (uwsgi.shared->spooler_pid, SIGKILL); 1305 fprintf(stderr,"wait4() the spooler with pid %d...", uwsgi.shared->spooler_pid); 1306 diedpid = waitpid(uwsgi.shared->spooler_pid, &waitpid_status, 0); 1265 1307 fprintf(stderr,"done."); 1266 1308 } … … 1305 1347 */ 1306 1348 #ifdef UWSGI_THREADING 1307 if (uwsgi.has_threads && uwsgi. options[UWSGI_OPTION_THREADS] == 1) {1349 if (uwsgi.has_threads && uwsgi.shared->options[UWSGI_OPTION_THREADS] == 1) { 1308 1350 uwsgi._save = PyEval_SaveThread (); 1309 1351 uwsgi.workers[uwsgi.mywid].i_have_gil = 0; … … 1311 1353 #endif 1312 1354 /* all processes ok, doing status scan after N seconds */ 1313 check_interval.tv_sec = uwsgi. options[UWSGI_OPTION_MASTER_INTERVAL];1355 check_interval.tv_sec = uwsgi.shared->options[UWSGI_OPTION_MASTER_INTERVAL]; 1314 1356 if (!check_interval.tv_sec) 1315 1357 check_interval.tv_sec = 1; 1316 1358 1317 if (udp_socket && u dp_poll.fd >= 0) {1318 rlen = poll (&u dp_poll, 1, check_interval.tv_sec * 1000);1359 if (udp_socket && uwsgi_poll.fd >= 0) { 1360 rlen = poll (&uwsgi_poll, 1, check_interval.tv_sec * 1000); 1319 1361 if (rlen < 0) { 1320 1362 perror ("poll()"); … … 1322 1364 else if (rlen > 0) { 1323 1365 udp_len = sizeof (udp_client); 1324 rlen = recvfrom (u dp_poll.fd, uwsgi.buffer, uwsgi.buffer_size, 0, (struct sockaddr *) &udp_client, &udp_len);1366 rlen = recvfrom (uwsgi_poll.fd, uwsgi.buffer, uwsgi.buffer_size, 0, (struct sockaddr *) &udp_client, &udp_len); 1325 1367 if (rlen < 0) { 1326 1368 perror ("recvfrom()"); … … 1331 1373 fprintf (stderr, "received udp packet of %d bytes from %s:%d\n", rlen, udp_client_addr, ntohs (udp_client.sin_port)); 1332 1374 if (uwsgi.buffer[0] == 0x30) { 1333 manage_snmp (u dp_poll.fd, (uint8_t *) uwsgi.buffer, rlen, &udp_client);1375 manage_snmp (uwsgi_poll.fd, (uint8_t *) uwsgi.buffer, rlen, &udp_client); 1334 1376 } 1335 1377 } … … 1351 1393 } 1352 1394 #endif 1353 check_interval.tv_sec = uwsgi. options[UWSGI_OPTION_MASTER_INTERVAL];1395 check_interval.tv_sec = uwsgi.shared->options[UWSGI_OPTION_MASTER_INTERVAL]; 1354 1396 if (!check_interval.tv_sec) 1355 1397 check_interval.tv_sec = 1; … … 1379 1421 #ifdef UWSGI_SPOOLER 1380 1422 /* reload the spooler */ 1381 if (spool_dir && uwsgi. workers[0].spooler_pid > 0) {1382 if (diedpid == uwsgi. workers[0].spooler_pid) {1423 if (spool_dir && uwsgi.shared->spooler_pid > 0) { 1424 if (diedpid == uwsgi.shared->spooler_pid) { 1383 1425 fprintf(stderr,"OOOPS the spooler is no more...trying respawn...\n"); 1384 uwsgi. workers[0].spooler_pid = spooler_start (uwsgi.serverfd, uwsgi_module);1426 uwsgi.shared->spooler_pid = spooler_start (uwsgi.serverfd, uwsgi_module); 1385 1427 continue; 1386 1428 } … … 1428 1470 fprintf (stderr, "Respawned uWSGI worker (new pid: %d)\n", pid); 1429 1471 #ifdef UWSGI_SPOOLER 1430 if (uwsgi.mywid <= 0 && diedpid != uwsgi. workers[0].spooler_pid) {1472 if (uwsgi.mywid <= 0 && diedpid != uwsgi.shared->spooler_pid) { 1431 1473 #else 1432 1474 if (uwsgi.mywid <= 0) { … … 1447 1489 } 1448 1490 1449 if (uwsgi. options[UWSGI_OPTION_HARAKIRI] > 0 && !uwsgi.master_process) {1491 if (uwsgi.shared->options[UWSGI_OPTION_HARAKIRI] > 0 && !uwsgi.master_process) { 1450 1492 signal (SIGALRM, (void *) &harakiri); 1451 1493 } … … 1511 1553 UWSGI_SET_IN_REQUEST; 1512 1554 1513 if (uwsgi. options[UWSGI_OPTION_LOGGING])1555 if (uwsgi.shared->options[UWSGI_OPTION_LOGGING]) 1514 1556 gettimeofday (&wsgi_req.start_of_request, NULL); 1515 1557 … … 1541 1583 else { 1542 1584 #endif 1543 if (!uwsgi_parse_response (&uwsgi.poll, uwsgi. options[UWSGI_OPTION_SOCKET_TIMEOUT], (struct uwsgi_header *) &wsgi_req, uwsgi.buffer)) {1585 if (!uwsgi_parse_response (&uwsgi.poll, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT], (struct uwsgi_header *) &wsgi_req, uwsgi.buffer)) { 1544 1586 continue; 1545 1587 } … … 1549 1591 1550 1592 // enter harakiri mode 1551 if (uwsgi. options[UWSGI_OPTION_HARAKIRI] > 0) {1552 set_harakiri(uwsgi. options[UWSGI_OPTION_HARAKIRI]);1553 } 1554 1555 ret = (*uwsgi. hooks[wsgi_req.modifier])(&uwsgi, &wsgi_req);1593 if (uwsgi.shared->options[UWSGI_OPTION_HARAKIRI] > 0) { 1594 set_harakiri(uwsgi.shared->options[UWSGI_OPTION_HARAKIRI]); 1595 } 1596 1597 ret = (*uwsgi.shared->hooks[wsgi_req.modifier])(&uwsgi, &wsgi_req); 1556 1598 // calculate execution time 1557 1599 gettimeofday(&wsgi_req.end_of_request, NULL) ; … … 1560 1602 1561 1603 // get memory usage 1562 if (uwsgi. options[UWSGI_OPTION_MEMORY_DEBUG] == 1)1604 if (uwsgi.shared->options[UWSGI_OPTION_MEMORY_DEBUG] == 1) 1563 1605 get_memusage(); 1564 1606 … … 1569 1611 1570 1612 if (!ret) 1571 (*uwsgi. after_hooks[wsgi_req.modifier])(&uwsgi, &wsgi_req);1613 (*uwsgi.shared->after_hooks[wsgi_req.modifier])(&uwsgi, &wsgi_req); 1572 1614 1573 1615 … … 1579 1621 1580 1622 // defunct process reaper 1581 if (uwsgi. options[UWSGI_OPTION_REAPER] == 1) {1623 if (uwsgi.shared->options[UWSGI_OPTION_REAPER] == 1) { 1582 1624 waitpid (-1, &waitpid_status, WNOHANG); 1583 1625 } … … 1590 1632 #endif 1591 1633 1592 if (uwsgi. options[UWSGI_OPTION_MAX_REQUESTS] > 0 && uwsgi.workers[uwsgi.mywid].requests >= uwsgi.options[UWSGI_OPTION_MAX_REQUESTS]) {1634 if (uwsgi.shared->options[UWSGI_OPTION_MAX_REQUESTS] > 0 && uwsgi.workers[uwsgi.mywid].requests >= uwsgi.shared->options[UWSGI_OPTION_MAX_REQUESTS]) { 1593 1635 goodbye_cruel_world (); 1594 1636 } … … 2305 2347 break; 2306 2348 case LONG_ARGS_CHECK_INTERVAL: 2307 uwsgi. options[UWSGI_OPTION_MASTER_INTERVAL] = atoi (optarg);2349 uwsgi.shared->options[UWSGI_OPTION_MASTER_INTERVAL] = atoi (optarg); 2308 2350 break; 2309 2351 case LONG_ARGS_PYARGV: … … 2321 2363 break; 2322 2364 case 'L': 2323 uwsgi. options[UWSGI_OPTION_LOGGING] = 0;2365 uwsgi.shared->options[UWSGI_OPTION_LOGGING] = 0; 2324 2366 break; 2325 2367 #ifdef UWSGI_SPOOLER … … 2382 2424 break; 2383 2425 case 'r': 2384 uwsgi. options[UWSGI_OPTION_REAPER] = 1;2426 uwsgi.shared->options[UWSGI_OPTION_REAPER] = 1; 2385 2427 break; 2386 2428 #ifndef ROCK_SOLID … … 2390 2432 break; 2391 2433 case 'm': 2392 uwsgi. options[UWSGI_OPTION_MEMORY_DEBUG] = 1;2434 uwsgi.shared->options[UWSGI_OPTION_MEMORY_DEBUG] = 1; 2393 2435 break; 2394 2436 case 'O': … … 2397 2439 #endif 2398 2440 case 't': 2399 uwsgi. options[UWSGI_OPTION_HARAKIRI] = atoi (optarg);2441 uwsgi.shared->options[UWSGI_OPTION_HARAKIRI] = atoi (optarg); 2400 2442 break; 2401 2443 case 'b': … … 2405 2447 #ifndef ROCK_SOLID 2406 2448 case 'c': 2407 uwsgi. options[UWSGI_OPTION_CGI_MODE] = 1;2449 uwsgi.shared->options[UWSGI_OPTION_CGI_MODE] = 1; 2408 2450 break; 2409 2451 #endif … … 2419 2461 break; 2420 2462 case 'R': 2421 uwsgi. options[UWSGI_OPTION_MAX_REQUESTS] = atoi (optarg);2463 uwsgi.shared->options[UWSGI_OPTION_MAX_REQUESTS] = atoi (optarg); 2422 2464 break; 2423 2465 case 'z': 2424 2466 if (atoi (optarg) > 0) { 2425 uwsgi. options[UWSGI_OPTION_SOCKET_TIMEOUT] = atoi (optarg);2467 uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT] = atoi (optarg); 2426 2468 } 2427 2469 break; … … 2429 2471 case 'T': 2430 2472 uwsgi.has_threads = 1; 2431 uwsgi. options[UWSGI_OPTION_THREADS] = 1;2473 uwsgi.shared->options[UWSGI_OPTION_THREADS] = 1; 2432 2474 break; 2433 2475 case 'P':
