Compare commits

..
6 Commits
10 changed files with 42 additions and 13 deletions
+20
View File
@@ -407,6 +407,24 @@ static int uwsgi_hook_hostname(char *arg) {
#endif
}
static int uwsgi_hook_unix_signal(char *arg) {
char *space = strchr(arg, ' ');
if (!space) {
uwsgi_log("invalid unix_signal syntax, must be <signum> <func>\n");
return -1;
}
*space = 0;
int signum = atoi(arg);
*space = ' ';
void (*func)(int) = dlsym(RTLD_DEFAULT, space+1);
if (!func) {
uwsgi_log("unable to find function \"%s\"\n", space+1);
return -1;
}
uwsgi_unix_signal(signum, func);
return 0;
}
static int uwsgi_hook_callint(char *arg) {
char *space = strchr(arg, ' ');
@@ -620,6 +638,8 @@ void uwsgi_register_base_hooks() {
uwsgi_register_hook("wait_for_socket", uwsgi_hook_wait_for_socket);
uwsgi_register_hook("unix_signal", uwsgi_hook_unix_signal);
// for testing
uwsgi_register_hook("exit", uwsgi_hook_exit);
uwsgi_register_hook("print", uwsgi_hook_print);
+1 -1
View File
@@ -95,7 +95,7 @@ int uwsgi_cr_peer_del(struct corerouter_peer *peer) {
if (peer->flush && !peer->is_flushing) {
peer->is_flushing = 1;
// on success, suspend the execution
if (peer->flush(peer) >= 0) return -1;
if (peer->flush(peer) > 0) return -1;
}
struct corerouter_peer *prev = peer->prev;
struct corerouter_peer *next = peer->next;
+6 -3
View File
@@ -320,7 +320,8 @@ ssize_t hr_ssl_write(struct corerouter_peer *main_peer) {
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_cr_error(main_peer, "hr_ssl_write()");
if (errno != 0)
uwsgi_cr_error(main_peer, "hr_ssl_write()");
}
else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) {
@@ -380,7 +381,8 @@ ssize_t hr_ssl_read(struct corerouter_peer *main_peer) {
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_cr_error(main_peer, "hr_ssl_read()");
if (errno != 0)
uwsgi_cr_error(main_peer, "hr_ssl_read()");
}
else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) {
@@ -420,7 +422,8 @@ ssize_t hr_ssl_shutdown(struct corerouter_peer *peer) {
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_cr_error(peer, "hr_ssl_shutdown()");
if (errno != 0)
uwsgi_cr_error(peer, "hr_ssl_shutdown()");
}
else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) {
+1 -1
View File
@@ -285,7 +285,7 @@ nonworker:
uwsgi_log("[perl] WARNING !!! unable to build uwsgi::opt hash !!!\n");
goto end;
}
if (SvTYPE(SvRV(*value)) == SVt_PVAV) {
if (SvROK(*value) && SvTYPE(SvRV(*value)) == SVt_PVAV) {
if (uwsgi.exported_opts[i]->value == NULL) {
av_push((AV *)SvRV(*value), newSViv(1));
}
+4 -2
View File
@@ -250,7 +250,8 @@ static ssize_t sr_write(struct corerouter_peer *main_peer) {
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_cr_error(main_peer, "sr_write()");
if (errno != 0)
uwsgi_cr_error(main_peer, "sr_write()");
}
else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) {
@@ -332,7 +333,8 @@ static ssize_t sr_read(struct corerouter_peer *main_peer) {
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_cr_error(main_peer, "sr_ssl_read()");
if (errno != 0)
uwsgi_cr_error(main_peer, "sr_ssl_read()");
}
else if (err == SSL_ERROR_SSL && uwsgi.ssl_verbose) {
+4 -2
View File
@@ -287,7 +287,8 @@ retry:
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_error("uwsgi_proto_ssl_write()/SSL_write()");
if (errno != 0)
uwsgi_error("uwsgi_proto_ssl_write()/SSL_write()");
}
return -1;
@@ -383,7 +384,8 @@ retry:
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_error("uwsgi_proto_ssl_read_body()/SSL_read()");
if (errno != 0)
uwsgi_error("uwsgi_proto_ssl_read_body()/SSL_read()");
}
return -1;
+2 -1
View File
@@ -760,7 +760,8 @@ retry:
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_error("uwsgi_proto_https_parser()/SSL_read()");
if (errno != 0)
uwsgi_error("uwsgi_proto_https_parser()/SSL_read()");
}
return -1;
empty:
+2 -1
View File
@@ -83,7 +83,8 @@ retry:
}
else if (err == SSL_ERROR_SYSCALL) {
uwsgi_error("uwsgi_proto_suwsgi_parser()/SSL_read()");
if (errno != 0)
uwsgi_error("uwsgi_proto_suwsgi_parser()/SSL_read()");
}
return -1;
+1 -1
View File
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
s.name = 'uwsgi'
s.license = 'GPL-2'
s.version = `python -c "import uwsgiconfig as uc; print uc.uwsgi_version"`.sub(/-dev-.*/,'')
s.date = '2015-07-01'
s.date = '2015-07-19'
s.summary = "uWSGI"
s.description = "The uWSGI server for Ruby/Rack"
s.authors = ["Unbit"]
+1 -1
View File
@@ -1,6 +1,6 @@
# uWSGI build system
uwsgi_version = '2.0.11'
uwsgi_version = '2.0.11.1'
import os
import re