view audio/private/pipeout.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
parents 672052bd81f8
children 62e31e7980e6
line wrap: on
line source
function [str,cleanup]=pipeout(cmd)
	fprintf('Starting sub-process: %s\n',cmd);
	process=java.lang.Runtime.getRuntime().exec({'bash','-c',cmd});
	str=process.getOutputStream();
	cleanup=@dispose;

	function dispose
		fprintf('Killing subprocess...\n');
		process.destroy();
	end
end