snj doesn't like my accent, so use proper English month names.
[netbsd-mini2440.git] / lib / libutil / ttymsg.3
blob2f28f436ba750c05fce76509b941ec5d8723c38a
1 .\" $NetBSD: ttymsg.3,v 1.10 2003/04/16 13:35:15 wiz Exp $
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
18 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
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 .\"
27 .Dd June 29, 1997
28 .Dt TTYMSG 3
29 .Os
30 .Sh NAME
31 .Nm ttymsg
32 .Nd ttymsg utility function
33 .Sh LIBRARY
34 .Lb libutil
35 .Sh SYNOPSIS
36 .In util.h
37 .Ft char *
38 .Fn ttymsg "struct iovec *iov" "int iovlen" "const char *tty" "int tmout"
39 .Sh DESCRIPTION
40 The
41 .Fn ttymsg
42 function is used by
43 programs such as
44 .Xr talkd 8 ,
45 .Xr syslogd 8 ,
46 .Xr wall 1 ,
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.
53 .Sh RETURN VALUES
54 .Fn ttymsg
55 returns a pointer to an error string on unexpected
56 error; the string is not newline-terminated.
57 Various "normal" errors are
58 ignored (exclusive-use, lack of permission, etc.).
59 .Sh SEE ALSO
60 .Xr writev 2