“The wait() system call suspends execution of the current process until one of its children terminates” . Waitpid also is similar.
My Question is whether calling wait() from one thread will cause all other threads (in the same process) also to go to sleep ? Do the behavior is same for detached threads also?
This is just a bug in the manual.
waitsuspends the calling thread, not the process. There is absolutely no way to suspend the whole process short of sending itSIGSTOPor manually suspending each thread one at a time.