b4n approved this pull request.
Not sure why we need to kill the child, but this works for me for correcting the issue. I would have though the `child-exited` handler should do all what is needed, but well.
FTR, I can reproduce seeing "weird behavior" of the directory following feature after restarting the terminal. I say weird because it stops working with some directories, maybe the one in which it was when it got restarted or something? I didn't investigate far enough but it looks reasonable when looking at the code.