pthread_join(3) Library Functions Manual pthread_join(3) pthread_join - POSIX threads library (libpthread, -lpthread) #include int pthread_join(pthread_t thread, void **retval); pthread_join() , thread. , pthread_join() . , thread, . retval NULL, pthread_join() (. ., , pthread_exit(3)) retval. , retval PTHREAD_CANCELED. , . pthread_join(), , (. ., ). pthread_join() 0; . EDEADLK (, ); thread . EINVAL thread . EINVAL . ESRCH thread . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |pthread_join() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ POSIX.1-2008. POSIX.1-2001. pthread_join() , . (, , ). , , . , (. ., ), <<->>. , - , - ( ). waitpid(-1, &status, 0) pthreads , >>. , , , , . : . pthread_create(3). pthread_cancel(3), pthread_create(3), pthread_detach(3), pthread_exit(3), pthread_tryjoin_np(3), pthreads(7) () Alexey, Azamat Hackimov , kogamatranslator49 , Darima Kogan , Max Is , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . pthread_join(3)