Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leftover /tmp/manhole-pid sockets in the tests #20

Merged
merged 1 commit into from
Sep 6, 2014

Conversation

nirs
Copy link
Collaborator

@nirs nirs commented Sep 6, 2014

manhole.install() registers an exit function removing the manhole
socket, but atexit function do not run when process is terminated by an
unhandled signal.

In the fork tests, we avoid this issue by terminating child processes
with SIGINT, however the test child processes, created by the
process_tests library, are terminate using SIGTERM in
TestProcess.__exit__.

Adding SIGTERM signal handler fixed this issue.

We probably need to document this as a workaround for issue #8

manhole.install() registers an exit function removing the manhole
socket, but atexit function do not run when process is terminated by an
unhandled signal.

In the fork tests, we avoid this issue by terminating child processes
with SIGINT, however the test child processes, created by the
process_tests library, are terminate using SIGTERM in
TestProcess.__exit__.

Adding SIGTERM signal handler fixed this issue.

We probably need to document this as a workaround for issue ionelmc#8
@ionelmc ionelmc merged commit 8ac2c1f into ionelmc:master Sep 6, 2014
@ionelmc
Copy link
Owner

ionelmc commented Sep 6, 2014

Ah damn, how did I miss this. Thanks!

@nirs nirs deleted the tests-cleanup branch September 27, 2014 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants