Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
3140cc3f
Commit
3140cc3f
authored
May 24, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugged exit-status code propigation.
parent
ee87740d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
ZServer/PCGIServer.py
ZServer/PCGIServer.py
+7
-6
lib/python/ZServer/PCGIServer.py
lib/python/ZServer/PCGIServer.py
+7
-6
No files found.
ZServer/PCGIServer.py
View file @
3140cc3f
...
@@ -112,10 +112,7 @@ from Producers import ShutdownProducer, LoggingProducer
...
@@ -112,10 +112,7 @@ from Producers import ShutdownProducer, LoggingProducer
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
from
tempfile
import
TemporaryFile
from
tempfile
import
TemporaryFile
import
socket
import
socket
,
string
,
os
,
sys
,
time
import
string
import
os
import
time
tz_for_log
=
compute_timezone_for_log
()
tz_for_log
=
compute_timezone_for_log
()
...
@@ -376,16 +373,20 @@ class PCGIPipe:
...
@@ -376,16 +373,20 @@ class PCGIPipe:
self
.
_channel
.
push
(
'%010d%s%010d'
%
(
l
,
data
,
0
),
0
)
self
.
_channel
.
push
(
'%010d%s%010d'
%
(
l
,
data
,
0
),
0
)
self
.
_channel
.
push
(
LoggingProducer
(
self
.
_channel
,
l
,
'log_request'
),
0
)
self
.
_channel
.
push
(
LoggingProducer
(
self
.
_channel
,
l
,
'log_request'
),
0
)
if
self
.
_shutdown
:
if
self
.
_shutdown
:
try
:
r
=
self
.
_shutdown
[
0
]
except
:
r
=
0
sys
.
ZServerExitCode
=
r
self
.
_channel
.
push
(
ShutdownProducer
(),
0
)
self
.
_channel
.
push
(
ShutdownProducer
(),
0
)
Wakeup
(
lambda
:
asyncore
.
close_all
())
else
:
else
:
self
.
_channel
.
push
(
None
,
0
)
self
.
_channel
.
push
(
None
,
0
)
Wakeup
()
Wakeup
()
self
.
_channel
=
None
self
.
_channel
=
None
def
finish
(
self
,
request
):
def
finish
(
self
,
request
):
if
request
.
headers
.
get
(
'bobo-exception-type'
,
''
)
==
\
if
request
.
headers
.
get
(
'bobo-exception-type'
,
''
)
==
\
'exceptions.SystemExit'
:
'exceptions.SystemExit'
:
r
=
re
sponse
.
headers
.
get
(
'bobo-exception-value'
,
'0'
)
r
=
re
quest
.
headers
.
get
(
'bobo-exception-value'
,
'0'
)
try
:
r
=
string
.
atoi
(
r
)
try
:
r
=
string
.
atoi
(
r
)
except
:
r
=
r
and
1
or
0
except
:
r
=
r
and
1
or
0
self
.
_shutdown
=
r
,
self
.
_shutdown
=
r
,
lib/python/ZServer/PCGIServer.py
View file @
3140cc3f
...
@@ -112,10 +112,7 @@ from Producers import ShutdownProducer, LoggingProducer
...
@@ -112,10 +112,7 @@ from Producers import ShutdownProducer, LoggingProducer
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
from
tempfile
import
TemporaryFile
from
tempfile
import
TemporaryFile
import
socket
import
socket
,
string
,
os
,
sys
,
time
import
string
import
os
import
time
tz_for_log
=
compute_timezone_for_log
()
tz_for_log
=
compute_timezone_for_log
()
...
@@ -376,16 +373,20 @@ class PCGIPipe:
...
@@ -376,16 +373,20 @@ class PCGIPipe:
self
.
_channel
.
push
(
'%010d%s%010d'
%
(
l
,
data
,
0
),
0
)
self
.
_channel
.
push
(
'%010d%s%010d'
%
(
l
,
data
,
0
),
0
)
self
.
_channel
.
push
(
LoggingProducer
(
self
.
_channel
,
l
,
'log_request'
),
0
)
self
.
_channel
.
push
(
LoggingProducer
(
self
.
_channel
,
l
,
'log_request'
),
0
)
if
self
.
_shutdown
:
if
self
.
_shutdown
:
try
:
r
=
self
.
_shutdown
[
0
]
except
:
r
=
0
sys
.
ZServerExitCode
=
r
self
.
_channel
.
push
(
ShutdownProducer
(),
0
)
self
.
_channel
.
push
(
ShutdownProducer
(),
0
)
Wakeup
(
lambda
:
asyncore
.
close_all
())
else
:
else
:
self
.
_channel
.
push
(
None
,
0
)
self
.
_channel
.
push
(
None
,
0
)
Wakeup
()
Wakeup
()
self
.
_channel
=
None
self
.
_channel
=
None
def
finish
(
self
,
request
):
def
finish
(
self
,
request
):
if
request
.
headers
.
get
(
'bobo-exception-type'
,
''
)
==
\
if
request
.
headers
.
get
(
'bobo-exception-type'
,
''
)
==
\
'exceptions.SystemExit'
:
'exceptions.SystemExit'
:
r
=
re
sponse
.
headers
.
get
(
'bobo-exception-value'
,
'0'
)
r
=
re
quest
.
headers
.
get
(
'bobo-exception-value'
,
'0'
)
try
:
r
=
string
.
atoi
(
r
)
try
:
r
=
string
.
atoi
(
r
)
except
:
r
=
r
and
1
or
0
except
:
r
=
r
and
1
or
0
self
.
_shutdown
=
r
,
self
.
_shutdown
=
r
,
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment