Exemple #1
0
 protected function trySendSigTerm($pid)
 {
     $this->logger->info('Try to send sigTerm for PID: ' . $pid);
     try {
         $sendSigResult = $this->commandsManager->sendSig($pid, SIGTERM);
         $this->logger->info("SigTerm return: " . serialize($sendSigResult));
         if (!$sendSigResult) {
             throw new ReactManagerException("SigTerm for PID " . $pid . " wasn't success.");
         }
     } catch (\Exception $e) {
         try {
             $this->logAndSendSigKill($pid, $e);
         } catch (\Exception $e) {
             $this->logger->warning("Child process with PID {$pid} can't be sigKilled.");
         }
     }
     return null;
 }