Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    Thanks, both -t or -tt works. But I still can't understand real reason of this: say, when I call shell remotely and close the connection, shell is terminated. But tail -f is not. Of course I have already read about -t option in man ssh, but it didn't help much. It seems I don't understand some generics, and I'd be happy if you suggest some docs to read about it, or probably explain it yourself. Thanks! Commented Jun 1, 2014 at 16:06
  • 2
    @DmitryFrank My understanding is this: If the connection breaks then sshd sends a SIGHUP. But where no terminal is there can be no terminal connection hangup... Commented Jun 1, 2014 at 16:29
  • Thanks, I will read about SIGHUP and other signals, still know almost nothing about it. Commented Jun 1, 2014 at 16:35
  • fyi: I just tried to run tail -f, then I've opened htop and sent SIGHUP to it (by pressing F9 -> 1 -> Enter), and tail -f is terminated! So, reason should be some different.. Commented Jun 1, 2014 at 17:59
  • 3
    @DmitryFrank You have misunderstood the problem. The problem is not that tail would not react to SIGHUP. The problem is that SIGHUP is **not sent` to tail without a pseudo terminal. You can see that by attaching strace to tail in both cases. Commented Jun 1, 2014 at 18:41