In linux, the whole process exits when the main thread terminates no matter how it terminates,by the function exit() or returns from main. If the main thread returns from main(),it will return to the "C runtime" known as crt.o or something like that. In the crt.o,whose c code like this: exit(main(argc, argv)); exit() will be called by the main thread
eventually, as a result, all the threads terminate.
Does my thought seem right?
If in the crt.o exit() is replaced by a thread terminating function like void thread_exit(int),which can only terminates a thread with an exit status, the c source code of crt.o seems like thread_exit(main(argc,argv)),do other thread still run when the main thread terminates?