I found that it works like peek on WINDOWS:
Code: Select all
(define (peek-pipe fd)
(letn (pos (seek fd)
size (seek fd -1))
(seek fd pos)
size
))
Code: Select all
(define (read-pipe fd)
(letn (buf "")
(read fd buf (peek-pipe fd))
buf
))
Any other comments?