bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #48371] read(fd, NULL, 0) from /dev/klog blocks until there is data


From: Kalle Olavi Niemitalo
Subject: [bug #48371] read(fd, NULL, 0) from /dev/klog blocks until there is data
Date: Thu, 7 Jul 2016 20:05:51 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0

Follow-up Comment #3, bug #48371 (project hurd):

I patched trans/streamio.c (trivfs_S_io_read) so that, if amount == 0, it
returns success without blocking.  I didn't change dev_read because it's
called only from trivfs_S_io_read and I thought it'd be better to avoid
locking global_lock in this case.  After installing this change and rebooting,
I then ran as root


rpctrace perl -e 'sysread STDIN, $_, 0' < /dev/klog


and it didn't hang.  I also ran "cat /dev/klog", which correctly output the
"unexpected RESEND from keyboard" message from gnumach when I used a key
combination to defocus the virtualbox window.  I did not retest /dev/klog
support in rsyslog.

As discussed on #hurd, I don't intend to post the patch itself.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48371>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]