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

From: [email-masked]
Date: Sat, 2 Aug 2025 16:00:58 +0200 (CEST)

Hi Ludo,

I found where the error gets set (debugging global variables is not fun)

As a reminder we get the D_WOULD_BLOCK error back from the initial 

if(err)
    return err;
check in dev_read.

In our case this comes from device_read_reply_inband from the errorcode parameter. I am not yet sure where/how this gets called.

My little C example now returns EWOULDBLOCK when reaching the "end" of /dev/klog.

However this does not really help the shepherd syslog because guile's read-line blocks forever waiting for a terminating newline. Also guile is unaware that further attempts to read would EWOULDBLOCK as "(select (vector port) #() #() 0)" indicates that reading is possible but then actually trying to a get a char blocks.