From 03bc7d03996685ee45157aa02fd67e3433c73a77 Mon Sep 17 00:00:00 2001 From: "roberto@mrspurr" Date: Wed, 28 Mar 2012 09:00:53 +0200 Subject: [PATCH] close bug 85 --- plugins/psgi/psgi_plugin.c | 8 +------- test.psgi | 13 ++++++++----- 2 files changed, 9 insertions(+), 12 deletions(-) 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') ], - ]; + ]; };