GNU bug report logs -
#77943
[PATCH 0/2] Using the Shepherd's system log on the Hurd
Previous Next
Full log
Message #23 received at 77943 <at> debbugs.gnu.org (full text, mbox):
Hello Ludo,
Jun 2, 2025, 16:09 by ludo <at> gnu.org:
> Hi,
>
> Right, I started looking into it back then but then didn’t take the time
> to track it down.
>
I tried your patch that you sent to bug-hurd but I still end up with D_WOULD_BLOCK at the end. Was it working for you?
As pointed out by Samuel on bug-hurd the initial "if (err) return err" looks weird. I tried removing it and at the end of /dev/klog it died with SIGLOST.
I then tried this patch similar to yours to intercept D_WOULD_BLOCK at the beginning instead:
diff --git a/trans/streamio.c b/trans/streamio.c
index e42ff908..ee3cf9b4 100644
--- a/trans/streamio.c
+++ b/trans/streamio.c
@@ -1005,7 +1005,12 @@ dev_read (size_t amount, void **buf, size_t *len, int nowait)
size_t max, avail;
if (err)
- return err;
+ {
+ if (err == D_WOULD_BLOCK)
+ return EWOULDBLOCK;
+ else
+ return err;
+ }
while (!buffer_readable (input_buffer))
{
and my example now fails with EAGAIN.
I am not sure yet what is setting this, the joy of global variables.
However something still seems wrong when I added back the shepherd syslog. It still crashes/hangs when it reaches the initial end of /dev/klog and does not process messages further:
there is an extra message and e.g. sshd messages to the syslog dont get processed.
root <at> childhurd ~# ./main
irq handler [11]: new delivery port f5e44038 entry f4f39840
errno: Resource temporarily unavailable
To be continued.
Note: I had to add the patch to the default hurd and just patching the hurd package that is used in operating-system-hurd was not enough. Dont know what is up with that.
> Thanks,
> Ludo’.
>
This bug report was last modified 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.