.\" WORD: current process ID 現プロセスID .\" WORD: AVAILABILITY 利用可能な環境 .\" Copyright 1997 Nicol疽 Lichtmaier .\" Created Wed Jul 2 23:27:34 ART 1997 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" Added info on availability, aeb, 971207 .\" Added -lutil remark, 030718 .\" 2008-07-02, mtk, document updwtmpx() .\" .\" Japanese Version Copyright (c) 1998 Tomoyuki NISHIOKA .\" all rights reserved. .\" Translated Sat May 23 18:46:34 JST 1998 .\" by Tomoyuki NISHIOKA .\" Updated 2003-09-14 by Kentaro Shirakata .\" Updated 2008-07-30 by Kentaro Shirakata .\" .TH UPDWTMP 3 2008-07-02 "GNU" "Linux Programmer's Manual" .SH 名前 updwtmp, logwtmp \- wtmp ファイルにエントリを追加する .SH 書式 .nf .B #include .sp .BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut ); .br .BI "void logwtmp(const char *" line ", const char *" name \ ", const char *" host ); .fi .SH 説明 .\"O .BR updwtmp () .\"O appends the utmp structure .\"O .I ut .\"O to the wtmp file. .BR updwtmp () は、utmp 構造体 .I ut を wtmp ファイルに追加する。 .PP .\"O .BR logwtmp () .\"O constructs a utmp structure using .\"O .IR line ", " name ", " host , .\"O current time and current process ID. .\"O Then it calls .\"O .BR updwtmp () .\"O to append the structure to the wtmp file. .BR logwtmp () は、 .IR line ", " name ", " host , 現在時刻、現プロセスID から utmp 構造体を作り、 .BR updwtmp () を呼び出してその構造体を wtmp ファイルに追加する。 .SH ファイル .TP .I /var/log/wtmp ユーザログインの履歴データベース .\"O .SH "CONFORMING TO" .SH 準拠 .\"O Not in POSIX.1-2001. .\"O Present on Solaris, NetBSD, and perhaps other systems. POSIX.1-2001 にはない。 Solaris, NetBSD に存在し、おそらく他のシステムにもあるだろう。 .\"O .SH AVAILABILITY .SH 利用可能な環境 .\"O Both functions are available under glibc2, but not under libc5. glibc2 の下ではどちらの関数も利用可能である。 .\"O However, .\"O .BR logwtmp () .\"O used to occur in the old libbsd. .\"O These days, the .\"O .BR logwtmp () .\"O function is included in libutil. .\"O (Hence you'll need to add \fI\-lutil\fP .\"O to your compiler commandline to get it.) libc5 の下ではどちらも使えないが、 .BR logwtmp () は古い libbsd にあった。 最近では、 .BR logwtmp () 関数は libutil に含まれている (したがって、この関数を使うためにはコンパイラのコマンドラインに \fI\-lutil\fP を追加する必要がある)。 .\"O .SH NOTES .SH 注意 .\"O For consistency with the other "utmpx" functions (see .\"O .BR getutxent (3)), .\"O glibc provides (since version 2.1): 他の "utmpx" 関数群 .RB ( getutxent (3) 参照) との一貫性のために、glibc (バージョン 2.1 以降) は以下の関数を 提供している: .nf .sp .B #include .sp .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); .fi .PP .\"O This function performs the same task as .\"O .BR updwtmp (), .\"O but differs in that it takes a .\"O .I utmpx .\"O structure as its last argument. この関数は .BR updwtmp () と同じ作業を行うが、最後の引き数として .I utmpx 構造体を取るところが異なる。 .SH 関連項目 .BR getutxent (3), .BR wtmp (5)