Time limit on .exe file execution

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);

답변 (1개)

Jacob Mathew
Jacob Mathew 2023년 6월 25일

0 개 추천

Hi Peter,
This will allow you to set up a timeout condition

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품

릴리스

R2022b

태그

질문:

2023년 6월 25일

답변:

2023년 6월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by