goutmp/main/test_bsd.go

19 lines
300 B
Go
Raw Permalink Normal View History

// +build freebsd
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"
2020-04-26 00:50:02 +00:00
utmp := goutmp.Put_utmp(user, "/dev/pts0", host)
2022-03-19 07:13:23 +00:00
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
}