| 1003 | } |
| 1004 | |
| 1005 | static cs_error_t sam_parent_kill_child ( |
| 1006 | int *action, |
| 1007 | pid_t child_pid) |
| 1008 | { |
| 1009 | /* |
| 1010 | * Kill child process |
| 1011 | */ |
| 1012 | if (!sam_internal_data.term_send) { |
| 1013 | /* |
| 1014 | * We didn't send warn_signal yet. |
| 1015 | */ |
| 1016 | kill (child_pid, sam_internal_data.warn_signal); |
| 1017 | |
| 1018 | sam_internal_data.term_send = 1; |
| 1019 | } else { |
| 1020 | /* |
| 1021 | * We sent child warning. Now, we will not be so nice |
| 1022 | */ |
| 1023 | kill (child_pid, SIGKILL); |
| 1024 | *action = SAM_PARENT_ACTION_RECOVERY; |
| 1025 | } |
| 1026 | |
| 1027 | return (CS_OK); |
| 1028 | } |
| 1029 | |
| 1030 | static cs_error_t sam_parent_mark_child_failed ( |
| 1031 | int *action, |
no outgoing calls
no test coverage detected