Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
python
py12306
Commits
3b15f260
Unverified
Commit
3b15f260
authored
Jan 12, 2019
by
pjialin
Committed by
GitHub
Jan 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4 from SCUTJcfeng/master
修复Windows signal模块没有SIGHUP的问题
parents
ee677c56
fc595d45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app.py
py12306/app.py
+2
-1
No files found.
py12306/app.py
View file @
3b15f260
...
@@ -56,9 +56,10 @@ class App:
...
@@ -56,9 +56,10 @@ class App:
def
register_sign
(
self
):
def
register_sign
(
self
):
is_windows
=
os
.
name
==
'nt'
is_windows
=
os
.
name
==
'nt'
signs
=
[
signal
.
SIGINT
,
signal
.
SIGHUP
,
signal
.
SIGTERM
]
if
is_windows
:
if
is_windows
:
signs
=
[
signal
.
SIGINT
,
signal
.
SIGTERM
]
signs
=
[
signal
.
SIGINT
,
signal
.
SIGTERM
]
else
:
signs
=
[
signal
.
SIGINT
,
signal
.
SIGHUP
,
signal
.
SIGTERM
]
for
sign
in
signs
:
for
sign
in
signs
:
signal
.
signal
(
sign
,
self
.
handler_exit
)
signal
.
signal
(
sign
,
self
.
handler_exit
)
...
...
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