in reply to High RAM script takes forever to terminate

A hackish solution would be to call _exit (in POSIX).