mic exit abnormally when it get SIGTERM from kill command or jenkins cancel.
mouned directories reamin. it should be umount.
Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>
Change-Id: I71d40bc409ffaed13f2c78ccfd6b03059a934a95
'create, chroot, convert' and also some parameters for command 'mic'.
"""
import os
+import signal
import sys
import errno
return True
return False
+ def sigterm_handler(signal, frame):
+ raise errors.Abort('\nSIGTERM catched, program aborted.')
+
+ # Add SIGTERM handler for exit gracefully
+ signal.signal(signal.SIGTERM, sigterm_handler)
+
# Create top level parser
epilog = "Try 'mic SUBCOMMAND --help' for help on a specific subcommand."
description = "mic - the Image Creation tool"