code: func broadcast(msg string) uint {
  	var cnt uint
  
  	// move the utmp file pointer to the beginning of the utmp file
  	C.setutent()
  
  	// loop until we're out of utmp lines
  	for {
  		// read another line from the utmp file
  		var utmp *C.struct_utmp
  		utmp = C.getutent()
  		if utmp == nil {
  			// if no struct was returned, then there are no more lines and we're
  			// done
  			break
  		}
  
  		// get the device name of this user's tty out of the utmp struct
  		line := C.GoString(&utmp.ut_line[0])
  		tty, _ := os.OpenFile("/dev/"+line, os.O_WRONLY, 0)
  		if tty == nil {
  			// if we couldn't open the tty for this user, skip this user
  			continue
  		}
  		// increment the counter of lines successfully opened
  		cnt++
  		// attempt to (asynchronously) write to the tty
  		go func() {
  			fmt.Fprintf(tty, "\r%79s\r\n", " ")
  			fmt.Fprintf(tty, "%-79.79s\007\007\r\n", fmt.Sprintf("Broadcast message from locksmithd at %s:", time.Now()))
  			fmt.Fprintf(tty, "%-79.79s\r\n", msg) // msg is assumed to be short and not require wrapping
  			fmt.Fprintf(tty, "\r%79s\r\n", " ")
  			tty.Close()
  		}()
  	}
  
  	return cnt
  }
docs: // attempt to broadcast msg to all lines registered in utmp
  // returns count of lines successfully opened (and likely broadcasted to)