diff options
author | Dan Crosta <dcrosta@10gen.com> | 2012-05-17 16:31:24 -0400 |
---|---|---|
committer | Dan Crosta <dcrosta@10gen.com> | 2012-05-18 09:33:08 -0400 |
commit | 351e57361855b395214a84c9fe2d33693a0f8460 (patch) | |
tree | ec257143480068c4e9ee18f3973b45df774b3a74 /buildscripts | |
parent | f645120867b38ead8ce3508eac1a60e67b8fb869 (diff) | |
download | mongo-351e57361855b395214a84c9fe2d33693a0f8460.tar.gz |
fall back to os.kill() if Popen.send_signal() does not exist (older Pythons)
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/buildlogger.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildscripts/buildlogger.py b/buildscripts/buildlogger.py index ccb0dee76cb..2f712e716f3 100644 --- a/buildscripts/buildlogger.py +++ b/buildscripts/buildlogger.py @@ -383,7 +383,10 @@ def loop_and_callback(command, callback): ) def handle_sigterm(signum, frame): - proc.send_signal(signum) + try: + proc.send_signal(signum) + except AttributeError: + os.kill(proc.pid, signum) # register a handler to delegate SIGTERM # to the child process |