[racket] Retrieving OS file handle from file ports

From: Bartosz Przygoda (bprzygoda at gmail.com)
Date: Sun Feb 1 15:48:26 EST 2015


It is possible to communicate via serial port by using input/output ports.
However, to achieve greater level of control, one needs to use other means
- for linux systems one may want to use API defined in termios.h.

I wanted to use Racket FFI for those functions, however, they require file
handle as parameter. Now, when I open port using open-input(-output)-port I
receive Racket variable where the internal OS handle is hidden. What are
the possibilities here? Is it possible to somehow grab file handle from
input/output port structures?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150201/7426c03f/attachment.html>

Posted on the users mailing list.