diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c index 3632f1f1..2227639b 100644 --- a/plugins/psgi/psgi_plugin.c +++ b/plugins/psgi/psgi_plugin.c @@ -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) { diff --git a/test.psgi b/test.psgi index 763eaea9..a04e982e 100644 --- a/test.psgi +++ b/test.psgi @@ -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') ], - ]; + ]; };