Pull requests

#2 Merged
Repository
mitchellrj mitchellrj
Branch
default
Repository
ianb ianb
Branch
default

Try to stop a daemonized process by sending SIGINT before SIGTERM

Author
  1. Richard Mitchell avatarRichard Mitchell
Reviewers
Description

Currently sending SIGTERM as first choice means the daemonized process doesn't have chance to shut down properly. In the case of Python processes, this specifically means that any functions registered using the atexit module of the standard library will not be called. This patch attempts SIGINT first, then tries to send SIGTERM if SIGINT has failed for 10 seconds.

This is particularly problematic in the specific case of Chameleon which uses atexit hooks to remove temporary directories created to contain compiled templates.

TL;DR: atexit isn't currently supported for processes daemonized by pastescript; it should be.

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.