示例#1
0
// Close closes a journal opened with NewJournal.
func (j *Journal) Close() error {
	sd_journal_close, err := j.getFunction("sd_journal_close")
	if err != nil {
		return err
	}

	j.mu.Lock()
	C.my_sd_journal_close(sd_journal_close, j.cjournal)
	j.mu.Unlock()

	return j.lib.Close()
}
示例#2
0
文件: journal.go 项目: nak3/rkt
// Close closes a journal opened with NewJournal.
func (j *Journal) Close() error {
	sd_journal_close, err := j.getFunction("sd_journal_close")
	if err != nil {
		return err
	}

	j.mu.Lock()
	C.my_sd_journal_close(sd_journal_close, j.cjournal)
	j.mu.Unlock()

	// we don't close the handle to reuse the symbol cache between Journal
	// instances. It will go away when the process exits.
	return nil
}