Commit d182955c authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Petr Pudlak
Browse files

Make luxid aware of SIGCHLD



As luxid forks off processes now, it may receive SIGCHLD
signals. Hence add a handler for this. Since we obtain the
success of the child from the job file, ignoring is good
enough.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent efb4c025
......@@ -42,6 +42,7 @@ import qualified Text.JSON as J
import Text.JSON (encode, showJSON, JSValue(..))
import System.Info (arch)
import System.Directory
import System.Posix.Signals as P
import qualified Ganeti.Constants as C
import qualified Ganeti.ConstantUtils as ConstantUtils (unFrozenSet)
......@@ -460,6 +461,8 @@ main _ _ (server, cref, jq) = do
_ <- lockFile qlockFile >>= exitIfBad "Failed to obtain the job-queue lock"
qlock <- newMVar ()
_ <- P.installHandler P.sigCHLD P.Ignore Nothing
finally
(forever $ U.listener (luxiHandler (qlock, jq, creader)) server)
(closeServer server)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment