Hello Jan, do you need to read the data from the file descriptor in a Scheme program? If so, I guess you can make a wrapper procedure [1] that uses 'scm_fdes_to_port' from 'libguile.h' to convert your file descriptor to a SCM port and return the port into the Scheme world.
Here's the description of 'scm_fdes_to_port' from GNU Guile 2.0.9
sources:
--8<---------------cut here---------------start------------->8---
/* Build a Scheme port from an open file descriptor `fdes'.
MODE indicates whether FILE is open for reading or writing; it uses
the same notation as open-file's second argument.
NAME is a string to be used as the port's filename.
*/
SCM
scm_i_fdes_to_port (int fdes, long mode_bits, SCM name)
--8<---------------cut here---------------end--------------->8---
Hope this helps,
- Artyom
[1] See '(guile) C Extensions' chapter from the Guile manual.
--
Artyom V. Poptsov <[email protected]>; GPG Key: 0898A02F
Home page: http://poptsov-artyom.narod.ru/
signature.asc
Description: PGP signature
