OSDN Git Service

635a7cfdc4e51f0e87d18a77140daf0c97d55f5d
[linuxjm/LDP_man-pages.git] / draft / man3 / updwtmp.3
1 .\" WORD: current process ID    現プロセスID
2 .\" WORD: AVAILABILITY          利用可能な環境
3 .\" Copyright 1997 Nicol疽 Lichtmaier <nick@debian.org>
4 .\" Created Wed Jul  2 23:27:34 ART 1997
5 .\"
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
10 .\"
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
15 .\"
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 .\" GNU General Public License for more details.
20 .\"
21 .\" Added info on availability, aeb, 971207
22 .\" Added -lutil remark, 030718
23 .\" 2008-07-02, mtk, document updwtmpx()
24 .\"
25 .\" Japanese Version Copyright (c) 1998 Tomoyuki NISHIOKA
26 .\"         all rights reserved.
27 .\" Translated Sat May 23 18:46:34 JST 1998
28 .\"         by Tomoyuki NISHIOKA <nishioka@a.tsukuba-tech.ac.jp>
29 .\" Updated 2003-09-14 by Kentaro Shirakata <argrath@ub32.org>
30 .\" Updated 2008-07-30 by Kentaro Shirakata <argrath@ub32.org>
31 .\"
32 .TH UPDWTMP 3  2008-07-02 "GNU" "Linux Programmer's Manual"
33 .SH 名前
34 updwtmp, logwtmp \- wtmp ファイルにエントリを追加する
35 .SH 書式
36 .nf
37 .B #include <utmp.h>
38 .sp
39 .BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut );
40 .br
41 .BI "void logwtmp(const char *" line ", const char *" name \
42 ", const char *" host );
43 .fi
44 .SH 説明
45 .\"O .BR updwtmp ()
46 .\"O appends the utmp structure
47 .\"O .I ut
48 .\"O to the wtmp file.
49 .BR updwtmp ()
50 は、utmp 構造体
51 .I ut
52 を wtmp ファイルに追加する。
53 .PP
54 .\"O .BR logwtmp ()
55 .\"O constructs a utmp structure using
56 .\"O .IR line ", " name ", " host ,
57 .\"O current time and current process ID.
58 .\"O Then it calls
59 .\"O .BR updwtmp ()
60 .\"O to append the structure to the wtmp file.
61 .BR logwtmp ()
62 は、
63 .IR line ", " name ", " host ,
64 現在時刻、現プロセスID から utmp 構造体を作り、
65 .BR updwtmp ()
66 を呼び出してその構造体を wtmp ファイルに追加する。
67 .SH ファイル
68 .TP
69 .I /var/log/wtmp
70 ユーザログインの履歴データベース
71 .\"O .SH "CONFORMING TO"
72 .SH 準拠
73 .\"O Not in POSIX.1-2001.
74 .\"O Present on Solaris, NetBSD, and perhaps other systems.
75 POSIX.1-2001 にはない。
76 Solaris, NetBSD に存在し、おそらく他のシステムにもあるだろう。
77 .\"O .SH AVAILABILITY
78 .SH 利用可能な環境
79 .\"O Both functions are available under glibc2, but not under libc5.
80 glibc2 の下ではどちらの関数も利用可能である。
81 .\"O However,
82 .\"O .BR logwtmp ()
83 .\"O used to occur in the old libbsd.
84 .\"O These days, the
85 .\"O .BR logwtmp ()
86 .\"O function is included in libutil.
87 .\"O (Hence you'll need to add \fI\-lutil\fP
88 .\"O to your compiler commandline to get it.)
89 libc5 の下ではどちらも使えないが、
90 .BR logwtmp ()
91 は古い libbsd にあった。
92 最近では、
93 .BR logwtmp ()
94 関数は libutil に含まれている
95 (したがって、この関数を使うためにはコンパイラのコマンドラインに
96 \fI\-lutil\fP を追加する必要がある)。
97 .\"O .SH NOTES
98 .SH 注意
99 .\"O For consistency with the other "utmpx" functions (see
100 .\"O .BR getutxent (3)),
101 .\"O glibc provides (since version 2.1):
102 他の "utmpx" 関数群
103 .RB ( getutxent (3)
104 参照) との一貫性のために、glibc (バージョン 2.1 以降) は以下の関数を
105 提供している:
106 .nf
107 .sp
108 .B #include <utmpx.h>
109 .sp
110 .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
111 .fi
112 .PP
113 .\"O This function performs the same task as
114 .\"O .BR updwtmp (),
115 .\"O but differs in that it takes a
116 .\"O .I utmpx
117 .\"O structure as its last argument.
118 この関数は
119 .BR updwtmp ()
120 と同じ作業を行うが、最後の引き数として
121 .I utmpx
122 構造体を取るところが異なる。
123 .SH 関連項目
124 .BR getutxent (3),
125 .BR wtmp (5)