]> git.e2factory.org Git - e2factory.git/commitdiff
be more responsive and frequently check for signals
authorTobias Ulmer <tu@emlix.com>
Mon, 3 Jun 2019 17:30:32 +0000 (19:30 +0200)
committerTobias Ulmer <tu@emlix.com>
Mon, 3 Jun 2019 17:30:32 +0000 (19:30 +0200)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua
local/licence.lua
local/projenv.lua
local/result.lua
local/source.lua

index 9b4677363bdd16e8143872a03455442519f07b51..205980cf5553962d9a7dd21e523d6efa6b62a39e 100644 (file)
@@ -1892,7 +1892,7 @@ function e2lib.callcmd(argv, fdctv, workdir, envdict, nowait, pty)
         local sync_pipes
 
         if e2lib.signal_received() ~= "" then
-            return false, err.new("signal received, shutting down e2factory")
+            return false, err.new("shutting down e2factory [fork]")
         end
 
         rc, re = fd_parent_setup(fdctv, argv)
index 8c3224fb4f0447eaa216dd6fec441c7fb5da6f05..25c785312fa405ec38f8f77705cb923b1631316d 100644 (file)
@@ -158,6 +158,10 @@ function licence.load_licence_config()
     for name,l in pairs(ltable) do
         local lerr = err.new("error in licence %q", name)
 
+        if e2lib.signal_received() ~= "" then
+            return false, err.new("shutting down e2factory [lic]")
+        end
+
         rc, re = e2lib.vrfy_dict_exp_keys(l, "licence",
             { "server", "files" })
         if not rc then
index 9874537b17bb96664f71eeba5136234ac26670c6..fd0ad6cf104a0f67531f5664ee6691af3ace6058 100644 (file)
@@ -75,6 +75,10 @@ local function _load_env_config(file)
     local rc, re
     local merge_error = false
 
+    if e2lib.signal_received() ~= "" then
+        return false, err.new("shutting down e2factory [penv]")
+    end
+
     local function mergeenv(data)
         -- upvalues: file, _load_env_config(), merge_error
         local rc, re
index e8444e839cf587ffad798a7f3a9d4a13bee9e0df..60fe0d7668b8913bb9fd1a573206b93fbab304b4 100644 (file)
@@ -692,6 +692,10 @@ function result.load_result_configs()
     for _,cfg in ipairs(configs) do
         local rawres, obj
 
+        if e2lib.signal_received() ~= "" then
+            return false, err.new("shutting down e2factory [res]")
+        end
+
         rawres, re = load_rawres(cfg)
         if not rawres then
             return false, re
index ac439393e677b21b930593319e4aa1e89cde77dc..ad51c1020eb8ef1e2ab4a8986a43ee25f7db100d 100644 (file)
@@ -246,6 +246,11 @@ function source.load_source_configs()
     end
 
     for _,cfg in ipairs(configs) do
+
+        if e2lib.signal_received() ~= "" then
+            return false, err.new("shutting down e2factory [src]")
+        end
+
         rc, re = e2tool.verify_src_res_pathname_valid_chars(cfg)
         if not rc then
             e:append("invalid source file name: %s", cfg)