Mercurial > hg > ishara
annotate 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 |
rev | line source |
---|---|
samer@0 | 1 function [str,cleanup]=pipeout(cmd) |
samer@0 | 2 fprintf('Starting sub-process: %s\n',cmd); |
samer@0 | 3 process=java.lang.Runtime.getRuntime().exec({'bash','-c',cmd}); |
samer@0 | 4 str=process.getOutputStream(); |
samer@0 | 5 cleanup=@dispose; |
samer@0 | 6 |
samer@0 | 7 function dispose |
samer@0 | 8 fprintf('Killing subprocess...\n'); |
samer@0 | 9 process.destroy(); |
samer@0 | 10 end |
samer@0 | 11 end |