Hi,
On linux, every process group is in a unique session. (When the process is
created, it becomes a member of the session of its parent.) By
convention, the session ID of a session equals the process ID of the
first member of the session, called the session leader. A process finds
the ID of its session using the system call getsid(). A session leader is the process which has the state 's', example:
user1 46080 0.0 0.0 131264 3660 pts/1 Ss feb05 0:01 -bash
Anyway I got it through ps command.
Thanks for your help.
Regards