Interpreter auto quit

Hello all,

It’s a simple question :
How can I quit programmatically SC lang ?

like a return(0) from the Main ?
Do I need SIGTERM ?

will do it. It returns:

-> 0
main: waiting for input thread to join...
main: quitting...
server 'localhost' disconnected shared memory interface
/quit sent

cleaning up OSC
Interpreter has quit. [Exit code: 0]

Yes, thank you!

All my old good habits vanished :frowning:

Is there also a way to reboot the interpreter from code ? (in order to start a new project without making all the cleanup)

The IDE’s language menu has two relevant commands:

  • Reboot interpreter. This quits the currently running sclang process and launches a new one.

  • Recompile class library. This resets the interpreter’s state, but within the same sclang process.

I don’t know of any sclang command to reboot the interpreter.

For the other, there is thisProcess.recompile.

Probably recompiling the class library is enough to “start a new project without making all the cleanup.”


1 Like