When watch(8) is listening TTY and user stops using this TTY (e.g. closes SSH connection) - watch proceeds listening it. It does not exit and does not write that the session is ended. The same problem is observed when security/termlog is used. termlog also uses snp(4) device and it also does not stop listening released TTY. Looks that this problem appeared in FreeBSD-8 after pty(4) was replaced with pts(4) and snp(4) was completely rewritten. How-To-Repeat: Just open 2 SSH sessions to the server: Session #1: root@test-advancedhosters:/root # tty /dev/pts/0 Session #2: root@test-advancedhosters:/root # watch /dev/pts/0 (and we see all the I/O of terminal /dev/pts/0) After logout of session #1 we see just "logout" word and watch proceeds listening. TTY device is present and it is disappear only after watch is killed: root@test-advancedhosters:/root # ps aux | grep watch | grep -v grep root 45903 0.0 0.0 12288 1940 1 I+ 12:11PM 0:00.00 watch /dev/pts/0 root@test-advancedhosters:/root # ls -la /dev/pts/0 crw-rw-rw- 1 root wheel 0, 67 May 28 12:13 /dev/pts/0 root@test-advancedhosters:/root # kill 45903 root@test-advancedhosters:/root # ls -la /dev/pts/0 ls: /dev/pts/0: No such file or directory
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped