goutmp/main/test_linux.go

19 lines
298 B
Go
Raw Normal View History

2020-04-26 00:50:02 +00:00
// +build linux
2018-06-01 20:18:05 +00:00
package main
import (
"time"
"blitter.com/go/goutmp"
2018-06-01 20:18:05 +00:00
)
func main() {
user := "bin"
host := "test.example.com"
2022-03-19 07:13:23 +00:00
utmp := goutmp.Put_utmp(user, "/dev/pts0", host)
goutmp.Put_lastlog_entry("xs", user, "/dev/pts0", host)
time.Sleep(10 * time.Second)
goutmp.Unput_utmp(utmp)
2018-06-01 20:18:05 +00:00
}