say executable c:\my irectory\myfile.exe
, r script calls on executeable system(myfile.exe)
the r script gives parameters executable programme uses them numerical calculations. ouput of executable, r script tests whether parameters ore not. if not good, parameters changed , executable rerun updated parameters.
now, executable carries out mathematical calculations , solutions may converge wish able kill executable once has takes long carry out calculations (say 5 seconds)
how do time dependant kill?
ps: question little related one: (time non dependant kill) how run executable file , later kill or terminate same process r in windows
you can add code r
function issued executable call:
settimelimit(elapse=5, trans=t)
this kill calling function, returning control parent environment (which function well). use examples in question linked further work.
alternatively, set loop examines sys.time
, if expected update parameter set has not taken place after 5 seconds, break loop , issue system kill command terminate myfile.exe
.
Comments
Post a Comment