2 unstable releases
0.2.0 | Aug 11, 2023 |
---|---|
0.1.0 | Aug 11, 2023 |
#2676 in Database interfaces
81 downloads per month
Used in 2 crates
(via uu_w)
17KB
438 lines
utmpx
Rust bindings and wrapper around utmpx.h
. utmpx.h
declares a structure and
functions to query (and update) the database of currently logged in users.
Because POSIX only defines a minimal set of fields, different implementations add different fields on top. This library is written with musl and GNU/Linux in mind. Patches with implementations for other platforms are welcome.
See also
- https://man7.org/linux/man-pages/man5/utmp.5.html
- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/utmpx.h.html
Licence
This project is licensed under the ISC licence. See LICENCE for details.
lib.rs
:
This library contains bindings to the types and functions in utmpx.h
.
The [sys
] module contains the raw bindings. The root module contains idiomatic wrappers.
The underlying utmpx
functions work with per-thread cursors. Care should be taken when using
this in multiple threads, but all functions should be usable from different threads.
For platforms that implement utmp.h
but not utmpx.h
, the intent is for wrappers to call the
utmp.h
equivalents.
Dependencies
~44KB