Mercurial > hg > ishara
view audio/private/pipein.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 | ae596261e75f |
line wrap: on
line source
function [str,cleanup]=pipein(cmd,q) if nargin<2, q=false; end if ~q, fprintf('Starting sub-process: %s\n',cmd); end process=java.lang.Runtime.getRuntime().exec({'bash','-c',cmd}); str=process.getInputStream(); cleanup=@dispose; function dispose if ~q, fprintf('Killing subprocess...\n'); end process.destroy(); end end