mingzym commented on code in PR #10908:
URL: https://github.com/apache/trafficserver/pull/10908#discussion_r1427911333


##########
rc/trafficserver.in:
##########
@@ -248,7 +248,7 @@ do_stop()
   #   1 if daemon was already stopped
   #   2 if daemon could not be stopped
   #   other if a failure occurred
-    start-stop-daemon --stop --quiet --retry=QUIT/30/KILL/5 --pidfile 
$TS_PIDFILE --name $TS_NAME
+    start-stop-daemon --stop --quiet --retry=QUIT/30/KILL/5 --pidfile 
$TS_PIDFILE --name '[TS_MAIN]'

Review Comment:
   changed only start-sop-daemon to hard coded [TS_MAIN] because that 
traffic_server process name is changed in /proc system, that is a very 
different case of using TS_NAME, unless all others follow this use case we 
should not mess up the origin TS_NAME definition, I'd prefer to change small, 
fix only if need to.
   
   ```
   zym@zymElite:~/tmp/trafficserver/rc$ grep TS_NAME trafficserver.in 
   TS_NAME=${TS_NAME:-traffic_server}
               launchctl bsexec / launchctl list $TS_NAME > /dev/null 2>&1 && 
exit 0
               launchctl bsexec / launchctl submit -l $TS_NAME -p $TS_DAEMON -o 
$STDOUTLOG -e $STDERRLOG -- $TS_DAEMON_ARGS
               name="$TS_NAME"
               action "Stopping ${TS_NAME}:" killproc -p $TS_PIDFILE -d 35 
$TS_DAEMON
               echo -n "Stopping ${TS_NAME}"
               launchctl bsexec / launchctl list $TS_NAME > /dev/null 2>&1 || 
exit 0
               echo "Stopping ${TS_NAME}"
               launchctl bsexec / launchctl remove ${TS_NAME}
               status -p $TS_PIDFILE $TS_NAME
               status_of_proc "$TS_DAEMON" "$TS_NAME" -p "$TS_PIDFILE" && exit 
0 || exit $?
               checkproc -p $TS_PIDFILE $TS_NAME
               launchctl bsexec / launchctl list $TS_NAME > /dev/null 2>&1
               if pgrep $TS_NAME > /dev/null ; then
                   echo "$TS_NAME running as pid `cat $TS_PIDFILE`"; else
                   echo "$TS_NAME not running"
   ```



-- 
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: github-unsubscr...@trafficserver.apache.org

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

Reply via email to