From 9be2ee291647c0e3bc899359dce92d3a3de38d12 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Fri, 25 Jul 2014 14:37:03 +0200 Subject: [PATCH] Fix `my_init` not properly exiting with a non-zero exit status when Ctrl-C is pressed. --- Changelog.md | 4 ++++ image/bin/my_init | 1 + 2 files changed, 5 insertions(+) diff --git a/Changelog.md b/Changelog.md index e95c080..949c76e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,7 @@ +## 0.9.13 (not yet released) + + * Fixed `my_init` not properly exiting with a non-zero exit status when Ctrl-C is pressed. + ## 0.9.12 (release date: 2014-07-24) * We now officially support `nsenter` as an alternative way to login to the container. With official support, we mean that we've provided extensive documentation on how to use `nsenter`, as well as related convenience tools. However, because `nsenter` has various issues, and for backward compatibility reasons, we still support SSH. Please refer to the README for details about `nsenter`, and what the pros and cons are compared to SSH. diff --git a/image/bin/my_init b/image/bin/my_init index f1cd4d0..a34694e 100755 --- a/image/bin/my_init +++ b/image/bin/my_init @@ -291,6 +291,7 @@ def main(args): info("%s exited with status %d." % (args.main_command[0], exit_status)) except KeyboardInterrupt: stop_child_process(args.main_command[0], pid) + raise except BaseException as s: warn("An error occurred. Aborting.") stop_child_process(args.main_command[0], pid)