Hi Mantas,
Thanks for your reply :)
Yes, I use sd_journal_get_fd() API as Zbigniew mentioned
https://github.com/AOSC-Dev/FixMe/blob/master/test/test_systemd_journal.c#L22
But sd_journal_get_data print out no such file or directory error
COREDUMP=ELF
https://github.com/AOSC-Dev/FixMe/blob/master/test/test_systemd_journal.c#L54
Please someone give me some advice, thanks a lot!
Regards,
Leslie Zhai <xiang.z...@i-soft.com.cn>
On 2014年06月08日 07:18, Mantas Mikulėnas wrote:
On Sat, Jun 7, 2014 at 8:49 AM, Leslie Zhai <xiangzha...@gmail.com> wrote:
[...]
But I do NOT know how to hook coredump in user space...
I simply cat /proc/sys/kernel/core_pattern
|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
Then systemd-coredump collector will be called (HOOKed), for example,
BANG ... segfault occured in user or kernel space. but there is NO dbus
interface provided for other App such as bug reporter frontend. so I
have to inotify /var/log/journal/SUBDIR
https://github.com/AOSC-Dev/FixMe/blob/master/test/qinotify/qinotify.cpp#L99
Please someone give me some advice, how to hook coredump in user/kernel
space based on systemd or other LIB, thanks a lot!
inotify is actually the official method for watching journal entries
-- just not directly, but using the sd_journal_get_fd() API that
Zbigniew mentioned...
From <http://www.freedesktop.org/wiki/Software/systemd/journal-files/>:
Clients intending to show a live view of the journal should use inotify() for
this to watch for files changes.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel