GNU bug report logs -
#77943
[PATCH 0/2] Using the Shepherd's system log on the Hurd
Previous Next
Full log
View this message in rfc822 format
Hello,
yelninei <at> tutamail.com writes:
> 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.
So you have a patch for /hurd/streamio and a C reproducer? (Maybe you
sent it already and I haven’t seen.)
> 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.
Ah but I think that’s fine: shepherd, suspendable ports are enabled (via
Fibers), which means that read attempts that return EAGAIN or
EWOULDBLOCK result in the calling fiber being suspended.
You would need to try this for real, but it should be fine.
Thanks!
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.