mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-07 14:11:46 +00:00
close bug 85
This commit is contained in:
@@ -472,19 +472,13 @@ int uwsgi_perl_magic(char *mountpoint, char *lazy) {
|
||||
|
||||
// taken from Torsten Foertsch AfterFork.xs
|
||||
void uwsgi_perl_post_fork() {
|
||||
/*
|
||||
GV *tmpgv;
|
||||
|
||||
PL_ppid = (IV)getppid();
|
||||
hv_clear(PL_pidstatus);
|
||||
|
||||
tmpgv = gv_fetchpv("$", TRUE, SVt_PV);
|
||||
GV *tmpgv = gv_fetchpv("$", TRUE, SVt_PV);
|
||||
if (tmpgv) {
|
||||
SvREADONLY_off(GvSV(tmpgv));
|
||||
sv_setiv(GvSV(tmpgv), (IV)getpid());
|
||||
SvREADONLY_on(GvSV(tmpgv));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
int uwsgi_perl_mount_app(char *mountpoint, char *app, int regexp) {
|
||||
|
||||
@@ -8,12 +8,15 @@ if ($rpc_value) {
|
||||
}
|
||||
|
||||
my $app = sub {
|
||||
my $env = shift;
|
||||
uwsgi::cache_set("key1", "val1");
|
||||
print uwsgi::call('hello');
|
||||
return [
|
||||
my $env = shift;
|
||||
uwsgi::cache_set("key1", "val1");
|
||||
if ($rpc_value) {
|
||||
print uwsgi::call('hello')."\n";
|
||||
}
|
||||
print 'pid '.$$."\n";
|
||||
return [
|
||||
'200',
|
||||
[ 'Content-Type' => 'text/plain' ],
|
||||
[ "Hello World\r\n", $env->{'REQUEST_URI'}, uwsgi::cache_get('key1'), uwsgi::call('hello') ],
|
||||
];
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user