GETSID(2) BSD System Calls Manual GETSID(2)NAME
getsid -- get session ID
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
pid_t
getsid(pid_t pid);
DESCRIPTION
The getsid() function returns the session ID of the process specified by pid. If pid is 0, the session ID of the calling process is
returned. The session ID is defined as the process group ID of the process that is the session leader.
ERRORS
If an error occurs, getsid() returns -1 and the global variable errno is set to indicate the error, as follows:
[ESRCH] No process can be found corresponding to that specified by pid.
SEE ALSO getpgid(2), setsid(2), termios(4)STANDARDS
The getsid() function conforms to X/Open Portability Guide Issue 4, Version 2 (``XPG4.2'').
BSD April 4, 2011 BSD
Check Out this Related Man Page
GETSID(2) BSD System Calls Manual GETSID(2)NAME
getsid -- get process session
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
pid_t
getsid(pid_t pid);
DESCRIPTION
The session ID of the process identified by pid is returned by getsid(). If pid is zero, getsid() returns the session ID of the current
process.
RETURN VALUES
Upon successful completion, the getsid() system call returns the session ID of the specified process; otherwise, it returns a value of -1 and
sets errno to indicate an error.
ERRORS
The getsid() system call will succeed unless:
[ESRCH] if there is no process with a process ID equal to pid.
Note that an implementation may restrict this system call to processes within the same session ID as the calling process.
SEE ALSO getpgid(2), getpgrp(2), setpgid(2), setsid(2), termios(4)HISTORY
The getsid() system call appeared in FreeBSD 3.0. The getsid() system call is derived from its usage in AT&T System V UNIX.
BSD August 19, 1997 BSD
1 . Thanks you for reading the letter
2 . I have programe a X-application .Sometimes, I run it from terminal of CDE ,it "kill" the CDE and I meet the login dialog . I debug it . I find that the SIGHUP caused the X-app died .I do not run it from terminal of CDE ,I run it "click button" from panel ,... (3 Replies)
I have a scenario where I need to find if a process is a daemon process or not. This check needs to be done from within the process. I know there are no direct API's to do so. I have explored these options.
1. ctermid() - this can be unsuccessful as per the man pages
2. int devtty; if ((devtty... (7 Replies)
When I run a script with truss it is exiting with error.
Without truss the script runs fine!
How to understand it?
I have used the truss to resolve a 'magic' disappearing, but it brings own questions.
The main problem is in a backgroun script, which on one server just disapeares,... (5 Replies)
Hello all,
I have read just about every rpcbind not starting thread and article on the internet it seems, but I have not found a solution to my problem as of yet. I have a solaris 10 server that has been running with no problems for a while. The other day it crashed and would not boot to the gui... (2 Replies)
Hello,
I am trying to use mutt in order to send emails. I have installed mutt using yum and pasted some details about it later in the post.
When I try to run:
echo test | mutt -s "Test Email" user@id.com
It doesn't do anything. I dont receive any emails. I have the SMTP details for... (1 Reply)