Re: What's the difference/relation between pid,tgid,pgid,sid?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Cristian...

> Can somebody explain to me or point me to some explanation of what
> the pgid and sid are and how they are related to the pid and the
> tgid?

Not sure if I can help much with. All I see is:
- pgid is actually task_struct->signal->pgrp. See sys_getpgid() on 
kernel/sys.c (2.6.x)
- sid is task_struct->signal->session. See sys_getsid().

Since they are included in signal_struct, I guess this is related with 
how signal is handled on process group. Seems it is also related with 
security module....maybe Mr Hartman can provide further clue...

> I am trying to understand how the pid hashing works and how I can
> change the pid of a process while it's running.  I know I need to do
> some __detach_pid and then attach it again under a different pid, but
> I'm not sure what to do about the rest of the pid types (PGID,
> SID)...

This is related to your previous post, right? OOT, why do you want to 
change runnable task's pid?

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux