Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getsid((2)) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

fork(2)

getpgid(2)

getpid(2)

setpgid(2)

setsid(2)

tcgetsid(3C)

getsid((2))

NAME

getsid() − get session ID

SYNOPSIS

#include <sys/types.h>

pid_t getsid (pid_t pid);

DESCRIPTION

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

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

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

exec(2), fork(2), getpgid(2), getpid(2), setpgid(2), setsid(2), tcgetsid(3C). 

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026