In this chapter we shall learn about: 1. Linux Process wait() system call 2. waitpid() 3. wait() 4. Process Completion Status: 5. Example 1: Simple wait system call: 6.Example 2: wait system call, when child generates segmentation fault Linux Process wait() system call We know the …
In this chapter we shall learn about: 1. API’s used in pthread condition variable 2. Example 1 Below are the API’s used for pthread condition variables 1. To initialize a condition: int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *cond_attr): Here, cond: It is the condition variable cond_attr: They are …
In this chapter we shall learn about: 1. API’s used in pthread mutex 2. Example 1 3. Example 2 1. To initialize a mutex, use below API: int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr); attributes for the mutex can be given through mutexattr, use NULL …