OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / 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 .BR updwtmp ()
46 は、utmp 構造体
47 .I ut
48 を wtmp ファイルに追加する。
49 .PP
50 .BR logwtmp ()
51 は、
52 .IR line ", " name ", " host ,
53 現在時刻、現プロセスID から utmp 構造体を作り、
54 .BR updwtmp ()
55 を呼び出してその構造体を wtmp ファイルに追加する。
56 .SH ファイル
57 .TP
58 .I /var/log/wtmp
59 ユーザログインの履歴データベース
60 .SH 準拠
61 POSIX.1-2001 にはない。
62 Solaris, NetBSD に存在し、おそらく他のシステムにもあるだろう。
63 .SH 利用可能な環境
64 glibc2 の下ではどちらの関数も利用可能である。
65 libc5 の下ではどちらも使えないが、
66 .BR logwtmp ()
67 は古い libbsd にあった。
68 最近では、
69 .BR logwtmp ()
70 関数は libutil に含まれている
71 (したがって、この関数を使うためにはコンパイラのコマンドラインに
72 \fI\-lutil\fP を追加する必要がある)。
73 .SH 注意
74 他の "utmpx" 関数群
75 .RB ( getutxent (3)
76 参照) との一貫性のために、glibc (バージョン 2.1 以降) は以下の関数を
77 提供している:
78 .nf
79 .sp
80 .B #include <utmpx.h>
81 .sp
82 .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
83 .fi
84 .PP
85 この関数は
86 .BR updwtmp ()
87 と同じ作業を行うが、最後の引き数として
88 .I utmpx
89 構造体を取るところが異なる。
90 .SH 関連項目
91 .BR getutxent (3),
92 .BR wtmp (5)