Permalink
Browse files

close bug 85

  • Loading branch information...
1 parent ed8f081 commit 03bc7d03996685ee45157aa02fd67e3433c73a77 roberto@mrspurr committed Mar 28, 2012
Showing with 9 additions and 12 deletions.
  1. +1 −7 plugins/psgi/psgi_plugin.c
  2. +8 −5 test.psgi
@@ -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) {
View
@@ -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') ],
- ];
+ ];
};

0 comments on commit 03bc7d0

Please sign in to comment.