003 Linux System ProgrammingIssues, queries and suggestions related to Linux, Linux Programming, IPC, Interprocess Communication, Synchronization, Semaphore, System Programming, Linux Software Development. » 003.11.POSIX-Threads
If main thread of process returns from its main() function then whole process terminates and all threads within the process abruptly terminates.
calling pthread_exit() inside main function prevent this from happening allowing main threads to terminates while other threads alive to complete their tasks.