Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
1
Merge Requests
1
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
Cédric Le Ninivin
erp5
Commits
e003c9bc
Commit
e003c9bc
authored
Sep 13, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WSGI: capture SIGTERM to properly shutdown the server
parent
68cabf53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
product/ERP5/bin/zopewsgi.py
product/ERP5/bin/zopewsgi.py
+5
-0
No files found.
product/ERP5/bin/zopewsgi.py
View file @
e003c9bc
...
...
@@ -3,7 +3,9 @@ from io import BytesIO
import
logging
import
os
import
posixpath
import
signal
import
socket
import
sys
from
tempfile
import
TemporaryFile
import
time
from
urllib
import
quote
,
splitport
...
...
@@ -160,6 +162,9 @@ def runwsgi():
make_wsgi_app
({},
zope_conf
=
args
.
zope_conf
)
from
Signals.SignalHandler
import
SignalHandler
SignalHandler
.
registerHandler
(
signal
.
SIGTERM
,
sys
.
exit
)
ip
,
port
=
splitport
(
args
.
address
)
port
=
int
(
port
)
createServer
(
...
...
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