I want to pack a rack web-application in order to distribute it, In which a infinite loop resides. So it won’t stop until my ctrl-c. But it seems ocra will only pack it when it ends ‘naturally’, and ctrl-c stopped the process.
have been tring use exit or abort in callmethod of object being passed to rake. after which the whole process do not end, some trace info appears though.
it is possible to invoke rake.run in a thread, and end application after given time. But I do not want to distribute a suicide version. so is there some more eligible and controllable way to normally end it ?
not sure if this is a insane question, but thanks in advance.
According to the OCRA docu, OCRA sets an environment variable
OCRA_EXECUTABLEwhen being run.So you could check for that environment var in your code and break the loop if OCRA is running, e.g.: