syslog and SYSLOG_ACTION_READ_ALL

Dmitry V. Levin ldv at altlinux.org
Wed May 13 00:52:10 UTC 2020


On Thu, Apr 30, 2020 at 10:23:44AM -0700, Alistair Francis wrote:
> On Wed, Apr 22, 2020 at 9:49 AM Alistair Francis <alistair23 at gmail.com> wrote:
> >
> > Hey,
> >
> > I'm seeing something strange with the strace tests. The syslog test
> > always hangs at this syscall:
> >
> > syslog(3 /* SYSLOG_ACTION_READ_ALL */, ..., 64) =
> >
> > From what I can tell that is the correct behaviour as it should block
> > until it reads something from the syslog. The problem is there is
> > nothing to read so this just hangs forever. Am I missing something
> > should the test somehow generate syslogs?
> >
> > I added some printk() statements in the kernel and that fixes the test
> > as there is now something in the syslog, but that doesn't seem like
> > the right fix.
> 
> Ping, do you mind helping me with this?

Does SYSLOG_ACTION_READ_ALL wait?  This behaviour does not seem to be
documented anywhere.  If it waits, this must be well hidden in the kernel
sources.


-- 
ldv


More information about the Strace-devel mailing list