You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/16 02:12:32 UTC

[GitHub] [pulsar] Nicklee007 opened a new pull request #14701: Fix the pid occupied check when use pulsar-daemon start or stop process

Nicklee007 opened a new pull request #14701:
URL: https://github.com/apache/pulsar/pull/14701


   Master Issue: #14700
   
   ### Motivation
   Fix the failed pid occupied check. we'll fail when use pulsar-daemon start or stop process, after the last time we exit the process direct kill or the progress occurred non-normal exit, then the bin/pulsar-broker.pid are retained, and the pid in the file is occupied by the thread in other progress.
   
   ### Modifications
   Change the pid occupied check from 'kill -0 $pid' to 'ps -p $pid'. The both will return false when the pid is occupied by one progress, but 'kill -0 $pid' will return true when the pid  is occupied by one progress's sub thread.
   
   
   Need to update docs? 
     
   - [X] `no-need-doc` 
     
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on pull request #14701: Fix the pid occupied check when use pulsar-daemon start or stop process

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #14701:
URL: https://github.com/apache/pulsar/pull/14701#issuecomment-1068682534


   A discussion in StackOverflow:
   
   https://stackoverflow.com/questions/30958964/why-do-kill-0-pid-echo-and-ps-ppid-echo-sometimes-differ


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #14701: [fix][deploy]: fix the pid occupied check when use pulsar-daemon start or stop process

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #14701:
URL: https://github.com/apache/pulsar/pull/14701


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #14701: [fix][deploy]: fix the pid occupied check when use pulsar-daemon start or stop process

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #14701:
URL: https://github.com/apache/pulsar/pull/14701


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org