There is a similar problem in the following link.
Using sendSignal to kill tail -f has no effect. This is the result of a script executed without using pty. In fact, after executing the script, execute ps -ef to check the running status of the program.
[root@node-10-194-188-76 software]# ./dxengine.sh start
[root@node-10-194-188-76 software]# ./dxengine.sh status
data-collect-service-datax-1.0-SNAPSHOT.jar is running. Pid is 8308
But, If I use pty to solve this problem, this will invalidate my execution of the program startup script.
so, i want to don't use pty and i can kill tail -f after disconnection.