Time limit on .exe file execution
2 ビュー (過去 30 日間)
古いコメントを表示
I have a function that executes an exe file and enters a txt file of inputs after the file executes. This function is called in a loop by another script. Occasionally, the exe file will get hung and will not terminate on its own. Is there a way for me to implement a time limit on the exe before killing the process?
this is how I currently execute the file, before I discovered the error.
cmd = 'program.exe < program_input.txt';
[status,result] = system(cmd);
0 件のコメント
回答 (1 件)
Jacob Mathew
2023 年 6 月 25 日
Hi Peter,
Check out how to use Eventually (Poll for value to asynchronously satisfy constraint - MATLAB - MathWorks India)
This will allow you to set up a timeout condition
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!