*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> getsid (2)              
Title
Content
Arch
Section
 

Contents


 getsid(2)                                                         getsid(2)




 NAME    [Toc]    [Back]
      getsid() - get session ID

 SYNOPSIS    [Toc]    [Back]
      #include <sys/types.h>

      pid_t getsid (pid_t pid);

 DESCRIPTION    [Toc]    [Back]
      The getsid() function returns the session ID of the specified process.
      If pid is 0, the call applies to the current process.  For this to be
      allowed, the current process and the referenced process must be in the
      same session.

 RETURN VALUE    [Toc]    [Back]
      Upon successful completion, getsid() returns the session ID of the
      specified process.  Otherwise, it returns a value of -l and sets errno
      to indicate the error.

 ERRORS    [Toc]    [Back]
      If the getsid() function fails, it sets errno (see errno(2)) to one of
      the following values:

           [EPERM]        The current process and the specified process are
                          not in the same session.

           [ESRCH]        No process can be found corresponding to that
                          specified by pid.

 SEE ALSO    [Toc]    [Back]
      exec(2), fork(2), getpgid(2), getpid(2), setpgid(2), setsid(2),
      tcgetsid(3C).


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
setsid IRIX set session ID
SSL_set_session NetBSD set a TLS/SSL session to be used during TLS/SSL connect
tt_session_quit HP-UX quit the session
SSL_set_session OpenBSD set a TLS/SSL session to be used during TLS/SSL connect
startx IRIX initialize an X session
xsm IRIX X Session Manager
SSL_set_session Tru64 Set a TLS/SSL session to be used during TLS/SSL connect
getsid FreeBSD get process session
setsid Linux run a program in a new session
getsid OpenBSD get process session
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service