Function −1 — exit current thread or process
Function doesn't return.
If process didn't create any threads explicitly then it has just one main thread exiting which results in process termination.
If current thread is the last one of the process, exiting it results in process termination.
This function terminates current thread. Any other (not current) thread could be terminated by calling function 18.2.