2018-03-21 1:54 GMT+08:00 C K Kashyap <ckkashyap@gmail.com>:
Got it - so if I have to redirect to a file, I could do this - 
(with-output-to-file "output.txt"
  (lambda ()
    (display
     (call-with-input-process
      program
      (lambda (port)
(read-line port #f))))))


Although, I'd like to understand why stdout-redirection: #f outputs to stdout and not the current output port.

Stdout is the current output port of the host OS environment, so this argument specifies that Gambit should leave it untouched.

Is that a problem?

That depends on you.