[plt-scheme] Re: Standard output from C extensions

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Mon Feb 23 01:54:20 EST 2004

sajiimori wrote:
> I'm making a MzScheme extension in C.  [...]
> Can I get standard output to appear in DrScheme's interactions window
> (preferably without adding MzScheme-specific code to the C file)?

I asked this question about C extensions and Scheme ports not long ago.
According to Matthew Flatt:

> There's not a simple way.
> Under Unix, you can probably create an OS-level pipe to get pipe_in and
> pipe_out, dup2(pipe_in, 1), then pump pipe_out into a Scheme output
> port. I'm not sure it will work, and it's certainly no fun.



Posted on the users mailing list.