From 7a90ea76297dc33c58c768e20afd8b978c3d640b Mon Sep 17 00:00:00 2001 From: Jerry Keselman Date: Wed, 9 Sep 2015 09:32:00 -0400 Subject: [PATCH] Pass TERM Signal to VixDiskLibServer Catch TERM signals in the SmartProxyWorker code that starts the VixDiskLibServer so that if the worker gets the signal, it will be sent to the VixDiskLibServer prior to exiting. The VixDiskLibServer already has a handler for TERM signals which causes it to shut down. This is one of a couple of PRs required to handle the following BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1258985 --- gems/pending/VixDiskLib/VixDiskLib.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/gems/pending/VixDiskLib/VixDiskLib.rb b/gems/pending/VixDiskLib/VixDiskLib.rb index 645281805e8..c4c2fce87eb 100644 --- a/gems/pending/VixDiskLib/VixDiskLib.rb +++ b/gems/pending/VixDiskLib/VixDiskLib.rb @@ -136,6 +136,7 @@ def self.start_service raise VixDiskLibError, "ERROR: VixDiskLib.connect() got #{e} on DRbObject.new_with_uri()" if retry_num == 0 retry_num -= 1 && retry end + trap("TERM") { kill("TERM", pid); $vim_log.warn "TERM Signal Received - exiting"; exit } vix_disk_lib_service end