mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 13:41:28 +00:00
added perl embedded module
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "psgi.h"
|
||||
|
||||
extern struct uwsgi_server uwsgi;
|
||||
|
||||
#define psgi_xs(func) newXS("uwsgi::" #func, XS_##func, "uwsgi")
|
||||
|
||||
XS(XS_reload) {
|
||||
dXSARGS;
|
||||
items = 0;
|
||||
|
||||
uwsgi_log("SENDING HUP TO %d\n", (int) uwsgi.workers[0].pid);
|
||||
if (kill(uwsgi.workers[0].pid, SIGHUP)) {
|
||||
uwsgi_error("kill()");
|
||||
XSRETURN_NO;
|
||||
}
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
void init_perl_embedded_module() {
|
||||
psgi_xs(reload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user