- NetBSD Manual Pages
TTYMSG(3) NetBSD Library Functions Manual TTYMSG(3)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
ttymsg -- ttymsg utility function
System Utilities Library (libutil, -lutil)
ttymsg(struct iovec *iov, int iovlen, const char *tty, int tmout);
The ttymsg() function is used by programs such as talkd(8), syslogd(8),
wall(1), etc., to display the contents of a uio structure on a terminal.
ttymsg() forks and finishes in the child if the write would block after
waiting up to tmout seconds.
ttymsg() returns a pointer to an error string on unexpected error; the
string is not newline-terminated. Various "normal" errors are ignored
(exclusive-use, lack of permission, etc.).
ttymsg could grow some flags and a username/uid who is the expected owner
of the tty. If the flags say so then the owner should be checked against
the tty owner, and the message should not be sent if there is a mismatch.
Also another flag could say check against group writable, and don't send
NetBSD 9.99 January 15, 2013 NetBSD 9.99