GNU bug report logs -
#77943
[PATCH 0/2] Using the Shepherd's system log on the Hurd
Previous Next
Full log
Message #44 received at 77943 <at> debbugs.gnu.org (full text, mbox):
Aug 25, 2025, 19:53 by ludo <at> gnu.org:
> Hello,
>
> yelninei <at> tutamail.com writes:
>
>> No i have not sent this:
>> Something like this fixes the D_WOULD_BLOCK errno.
>> --8<---------------cut here---------------start------------->8---
>> diff --git a/trans/streamio.c b/trans/streamio.c
>> index e42ff908..93057146 100644
>> --- a/trans/streamio.c
>> +++ b/trans/streamio.c
>> @@ -1049,6 +1049,8 @@ device_read_reply_inband (mach_port_t reply, kern_return_t errorcode,
>>
>> input_pending = 0;
>> err = errorcode;
>> + if (err == D_WOULD_BLOCK)
>> + err = EWOULDBLOCK;
>> if (!err)
>> {
>> if (datalen == 0)
>> --8<---------------cut here---------------end--------------->8---
>>
>
> Neat! You should send this and the C reproducer to bug-hurd. :-)
>
>> It is fine in the sense that fibers suspends the system-log successfully at the "end" of /dev/klog.
>> However It is not fine because it will never wake up it up again.
>> According to the c example it now returns EWOULDBLOCK as expected.From testing around a bit I think it might be (@ (ice-9 rdelim) read-line) waiting for a terminating newline.
>> And again when I retried this just now there was the noticable delay with anything shepherd when the shepherd-syslog is running (default (system-log-configuration) configuration)
>>
>
> Great. So… mission accomplished?
>
Not really. The system-log still stops working when it reaches the EWOULDBLOCK at the end of of the kernel log.
I think it has to do with the incomplete last message that is causing the system-log fiber to be suspended at the wrong time but I don't really know.
I have sent the diff to bug-hurd and also asked about the missing \n there.
> Thank you!
>
> Ludo’.
>
This bug report was last modified 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.