Thursday, November 23, 2023

Which system call returns the process identifier of a terminated child?


Answer: wait() system call

A system call is a low-level function that is used to communicate with the operating system kernel.

wait() system call is used in processes that have a parent-child relationship. It makes a parent process stop its execution till the termination of the child process.

When the system call completes, it returns the following.

Process ID: The process ID of the child process that is terminated, which has the object type pid_t.

Error value: If there is any error during system call execution, it will return -1, which can be used for error handling.

0 comments:

Post a Comment

Data Structures with C++



NET/SET/CS PG



Operating Systems



Computer Networks



JAVA



Design and Analysis of Algorithms



Programming in C++

Top