C API and stdout

A further question on this having had a read around the code: so if one wants to capture stdout, create a virtual file, then add ->filename to the command-line options of the module (where filename was specified in the creation of the virtual file). But virtual file creation requires specification of the family of the data (GMT_IS_GRID and so on), and there seems to be no “generic” family, suggesting that this mechanism is solely for the capture of structured data. One would not use this to capture the verbose output of modules who’s data output is already directed to file, or the semi-structured output of grdinfo for example. Would that be a fair summary?

If so, not a problem, I can capture stdout in the usual generic POSIX fashion with dup etc.

My motivation here is for my Ruby interface to GMT, I’d like to always capture stdout (structured, unstructured, verbose output etc) and then pass it back to Ruby’s stdout abstraction for the caller to handle as they see fit.