Command Details

$ tail --pid=PID -n 1 -f file.txt

Terminate after process ID (PID) dies.