Pull requests

#2 Merged
Repository
mitchellrj
Branch
default
Repository
ianb
Branch
default

Try to stop a daemonized process by sending SIGINT before SIGTERM

Author
  1. Richard 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.

  • Learn about pull requests

Comments (0)