On Thu, Jun 30, 2016 at 04:11:57PM +0100, Chris Vine wrote: > On Thu, 30 Jun 2016 16:24:52 +0200 > > The OP (IIUC) states that this doesn't happen automatically for > > anything but the TCP unit's sockets, which is incorrect AFAICT. Any > > port created by the system's core procedures should be nonblocking. > > I think you are wrong. On my limited testing it happens with chicken if > you use R5RS's open-input-file on any file which is not on the file > system, such as "/dev/tty". open-input-file is on any basis part of > the system's core procedures. And of course, reads of files on the file > system never block at all: they just return end-of-file when the end is > reached, so the issue doesn't arise with them in the first place.
Dammit, you're right! I had no idea, sorry for being so dense. I've created https://bugs.call-cc.org/ticket/1303 for this. > > This a reasonably low-level procedure that you should only need to > > call when writing your own procedures that use file descriptors. When > > you are using ports, this should be done automatically, in all cases. > > It appears not. Indeed, and that is certainly a bug! > Obviously you can always win if any use other than opening a file on the > file system (which never blocks anyway) or opening a socket (for which > chicken makes special provision) is considered "a low level use". > However, that just means you are agreeing with what I and the original > poster said, maybe without realising it. No, I realise completely. I was just confused as to what you were saying. For some reason I never ran into this, and this hasn't been reported before (by my knowledge). But AFAIK the manual states that all ports are nonblocking, or am I just too confused right now? Cheers, Peter
signature.asc
Description: Digital signature
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
