Subject: [bug#77943] [PATCH 1/2] services: shepherd: Provide the right #:kernel-log-file on the Hurd.

From: [email-masked]
Date: Tue, 10 Jun 2025 16:56:38 +0200 (GMT+02:00)

Hello,

Jun 10, 2025, 12:55 by [email-masked]:

> Hi Yelninei,
>
> [email-masked] writes:
>
>> 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?
>>
>
> No no, it wasn’t, but I haven’t taken the time to dig further.
>
>> 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.
>>
>
> [...]
>
>> and my example now fails with EAGAIN.
>>
>
> I’m not sure what example but EAGAIN is fine, it’s what we want.
>

The example is just some terrible C code that runs fgets in a loop.

When I try something similar with guile and (@ (ice-9 rdelim) read-line) it seems to block forever at the "last" line.
 From the C example that last line seems to be missing a terminating newline and I am thinking read-line cannot handle this situation when the deliminator is just EAGAIN so the port is never handed of to fibers (fport_read which was erroring before seems to return -1  in this case as a ssize_t cast to size_t which also seems wrong ).

Further investigation required.
> Thanks for investigating!
>
> Ludo’.
>
Yelninei