[BACK]Return to ttymsg.3 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libutil

Annotation of src/lib/libutil/ttymsg.3, Revision 1.13

1.13    ! wiz         1: .\" $NetBSD: ttymsg.3,v 1.12 2013/01/15 22:42:14 christos Exp $
1.1       christos    2: .\"
                      3: .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
                      4: .\" All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
                     14: .\"
                     15: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     16: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     17: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1.4       jtc        18: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     19: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1.1       christos   20: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     21: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     22: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     23: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     24: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     25: .\" POSSIBILITY OF SUCH DAMAGE.
                     26: .\"
1.12      christos   27: .Dd January 15, 2013
1.1       christos   28: .Dt TTYMSG 3
1.6       garbled    29: .Os
1.1       christos   30: .Sh NAME
                     31: .Nm ttymsg
                     32: .Nd ttymsg utility function
1.5       perry      33: .Sh LIBRARY
                     34: .Lb libutil
1.1       christos   35: .Sh SYNOPSIS
1.10      wiz        36: .In util.h
1.1       christos   37: .Ft char *
1.2       mikel      38: .Fn ttymsg "struct iovec *iov" "int iovlen" "const char *tty" "int tmout"
1.1       christos   39: .Sh DESCRIPTION
                     40: The
1.2       mikel      41: .Fn ttymsg
1.1       christos   42: function is used by
                     43: programs such as
                     44: .Xr talkd 8 ,
                     45: .Xr syslogd 8 ,
                     46: .Xr wall 1 ,
1.2       mikel      47: etc., to display the contents of a uio structure on a terminal.
                     48: .Fn ttymsg
                     49: forks and finishes in the child if the write would block after
                     50: waiting up to
                     51: .Fa tmout
                     52: seconds.
1.1       christos   53: .Sh RETURN VALUES
1.2       mikel      54: .Fn ttymsg
                     55: returns a pointer to an error string on unexpected
1.9       wiz        56: error; the string is not newline-terminated.
                     57: Various "normal" errors are
1.1       christos   58: ignored (exclusive-use, lack of permission, etc.).
1.13    ! wiz        59: .Sh SEE ALSO
        !            60: .Xr writev 2
1.12      christos   61: .Sh BUGS
                     62: .Nm
                     63: could grow some flags and a username/uid who is the expected owner
                     64: of the tty.
                     65: If the flags say so then the owner should be checked against the tty
                     66: owner, and the message should not be sent if there is a mismatch.
                     67: Also another flag could say check against group writable, and don't
                     68: send a message.

CVSweb <webmaster@jp.NetBSD.org>