Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1200#discussion_r179025777
  
    --- Diff: distribution/src/resources/drillbit.sh ---
    @@ -127,6 +127,44 @@ check_before_start()
       fi
     }
     
    +check_after_start(){
    +    #check if the process is running
    +    if [ -f $pid ]; then
    +      dbitProc=$(ps -ef | grep `cat $pid` | grep Drillbit)
    --- End diff --
    
    If you get this far, the pid must exist or the scripts are broken.
    
    The only question is whether the process is still running. The chance that 
it is not is very low. Also, there is a race condition: the process may exit 
just after we check it. So, not sure it is even worth doing the check.
    
    Finally, the standard way to check for the process is `kill -0 $pid`". See 
`waitForProcessEnd()`.


---

Reply via email to