]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mesg: do not print 'ttyname failed' message unless --verbose requested
authorSami Kerola <kerolasa@iki.fi>
Thu, 2 Aug 2018 18:35:51 +0000 (19:35 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 3 Aug 2018 10:27:02 +0000 (12:27 +0200)
commit8dd5832395c6a0b12e11b37c062e4c11be3c82ef
treea0da27e492def5c7dc8ad0e5a2a1e9da9425a85d
parentc6789d37eaf45124275b8434829a313d7d16c118
mesg: do not print 'ttyname failed' message unless --verbose requested

Lots of people are confused why mesg(1) is priting this message.  Usual
cause seems to be an uninteractive shell trying to turn running 'mesg n'
from a /root/.profile where command invocation is by default on debian based
systems.  This might be rare case when failing silently is better.

[kzak@redhat.com: - add note to the man page
                  - fix if(isatty()) logic]

Reference: https://www.google.com/search?q=mesg+ttyname+failed
Review: https://marc.info/?l=util-linux-ng&m=153319988631233&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/mesg.1
term-utils/mesg.c