Hi Alejandro & Marc, this is exactly the use case I had when I asked the list and likely Alejandro referred to Marcs answer to my question. So I'm afraid this is really something we need [Q]: How would I turn a file descriptor, as exported from some library and ready/intented to be used with poll(2)/select(2) into a port? Thanks sooo much. /Jörg Background: Since when I'm using this ##open-predefined and have on my list to ask why this seems not to integrate into gambit's threading as good as I had hoped for. Nevertheless Marcs suggestion to use open-tcp-server does not work for me. I really need a unix domain socket. Actually an abstract socket on Linux. No way around. :-/ But I'd like it to block the calling thread on input. Which did not work out for me. (There is lambdanative and Android in the mix too, but my current _guess_ is that neither is to blame here.) Which leaves me with the question above. On Sat, 4 Apr 2020 22:59:42 -0700 (PDT) Alejandro Santana <santana@mailbox.org> wrote:
Thanks for the explanation.
BTW, why do you need this? Just learning scheme and c. I wanted to have gambit receive s-exps over a unix domain socket. I figured it would be simplest if I could turn the file descriptor returned from accept into a port and call scheme's read on it. I can do without this though and I'd rather not have ports piling up.
I'm curious though if there's a better way to turn a file descriptor into a port. ##open-predefined is what I saw mentioned when I searched the mailing list.