Qian Zhang created MESOS-8168:
---------------------------------

             Summary: Port kill policy test helper on Windows
                 Key: MESOS-8168
                 URL: https://issues.apache.org/jira/browse/MESOS-8168
             Project: Mesos
          Issue Type: Task
            Reporter: Qian Zhang
            Assignee: Andrew Schwartzmeyer
            Priority: Normal


Kill policy test helper ({{src/tests/kill_policy_test_helper.cpp}}) blocks 
until it receives a {{SIGTERM}}, then sleeps for a configurable amount of time 
before finally returning 0, so it actually implements graceful shutdown.

But currently kill policy test helper only calls Linux specific functions to 
set up signal handler, so it can not be compiled on Windows. We may need to 
port it on Windows by calling Windows APIs to set up signal handler as well. 
See the link below for the APIs we may consider to leverage on Windows:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/signal

In another hand, it seems the functions {{os::kill()}} and {{os::killtree()}} 
of Windows version do not send the specific signal to the target process, 
{{os::kill()}} handles {{SIGKILL}}, {{SIGSTOP}} and {{SIGTERM}} in the exactly 
same way, and {{os::killtree()}} just simply ignore the signal to be sent. So 
we may need to improve these two methods on Windows as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to