goutmp/main/test_bsd.go

18 lines
299 B
Go
Raw Normal View History

2020-04-26 00:50:02 +00:00
// +build bsd
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)
goutmp.Put_lastlog_entry("hkexsh", user, "/dev/pts0", host)
time.Sleep(10 * time.Second)
goutmp.Unput_utmp(utmp)
2018-06-01 20:18:05 +00:00
}