struct task_struct {

Both are of type pid_t, which resolves to the type_kernel_pid_t; this, in turn, has to be defined by each architecture. Usually an int is used, which means that 232 different IDs can be used simultaneously.

The session and process group IDs are not directly contained in the task structure itself, but in the structure used for signal handling. task_struct->signal->_session denotes the global SID, while the global PGID is stored in task_struct->signal->_pgrp. The auxiliary functions set_task_session and set_task_pgrp are provided to modify the values.

Continue reading here: ManagingPIDs

Was this article helpful?

0 0