Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
gevent
Commits
7b4d4f8f
Commit
7b4d4f8f
authored
May 29, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify xtest_signal.py
parent
452536b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
greentest/xtest_signal.py
greentest/xtest_signal.py
+5
-14
No files found.
greentest/xtest_signal.py
View file @
7b4d4f8f
...
...
@@ -8,15 +8,13 @@ Comment out the lines in ev.c that start the timer if you want to see for yourse
Reproduced on my machine (Linux 3.0.0-16-generic) with backend epoll and select.
With signalfd enabled (GEVENT_BACKEND=signalfd) it seems to work OK or at least takes
much longer to reproduce.
With signalfd enabled (GEVENT_BACKEND=signalfd) it seems to work.
"""
import
gevent
from
contextlib
import
closing
import
gc
import
pickle
from
gevent
import
select
import
signal
from
gevent
import
subprocess
import
traceback
import
sys
...
...
@@ -24,20 +22,13 @@ import os
gc
.
disable
()
MAIN_PID
=
os
.
getpid
()
def
handlerA
(
signum
,
frame
):
pass
MAX_DURATION
=
10
def
run_test
():
signal
.
signal
(
signal
.
SIGHUP
,
handlerA
)
pid
=
os
.
getpid
()
child
=
subprocess
.
Popen
([
'
kill'
,
'-HUP'
,
str
(
pid
)
])
# XXX the main point seems to be that a process is short-lived
# maybe somehow the child is reaped by previously scheduled sigcb?
child
=
subprocess
.
Popen
([
'
/bin/true'
])
child
.
wait
()
# << this is where it blocks
...
...
@@ -78,7 +69,7 @@ def test_main():
tb
=
pickle
.
load
(
done_r
)
assert
not
tb
,
tb
else
:
os
.
kill
(
child
,
signal
.
SIGKILL
)
os
.
kill
(
child
,
9
)
assert
False
,
'Test deadlocked after %d seconds.'
%
MAX_DURATION
...
...
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