TCGETSID(3) Linux Programmer's Manual TCGETSID(3)NAME
tcgetsid - get session ID
SYNOPSIS
#define _XOPEN_SOURCE 500 /* See feature_test_macros(7) */
#include <termios.h>
pid_t tcgetsid(int fd);
DESCRIPTION
The function tcgetsid() returns the session ID of the current session that has the terminal associated to fd as controlling terminal. This
terminal must be the controlling terminal of the calling process.
RETURN VALUE
When fd refers to the controlling terminal of our session, the function tcgetsid() will return the session ID of this session. Otherwise,
-1 is returned, and errno is set appropriately.
ERRORS
EBADF fd is not a valid file descriptor.
ENOTTY The calling process does not have a controlling terminal, or it has one but it is not described by fd.
VERSIONS
tcgetsid() is provided in glibc since version 2.1.
CONFORMING TO
POSIX.1-2001.
NOTES
This function is implemented via the TIOCGSID ioctl(2), present since Linux 2.1.71.
SEE ALSO getsid(2)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2010-09-10 TCGETSID(3)
Check Out this Related Man Page
tcgetsid(3C) Standard C Library Functions tcgetsid(3C)NAME
tcgetsid - get process group ID for session leader for controlling terminal
SYNOPSIS
#include <termios.h>
pid_t tcgetsid(int fildes);
DESCRIPTION
The tcgetsid() function obtains the process group ID of the session for which the terminal specified by fildes is the controlling terminal.
RETURN VALUES
Upon successful completion, tcgetsid() returns the process group ID associated with the terminal. Otherwise, a value of (pid_t)-1 is
returned and errno is set to indicate the error.
ERRORS
The tcgetsid() function will fail if:
EACCES The fildes argument is not associated with a controlling terminal.
EBADF The fildes argument is not a valid file descriptor.
ENOTTY The file associated with fildes is not a terminal.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5), standards(5), termio(7I)SunOS 5.10 14 Aug 2002 tcgetsid(3C)
Hi:-
Problem: How can I see Solaris CDE (graphic windows) through through Exceed session from my workstation.
Any idea, comments or docs... (2 Replies)
hi everyone...
simple question,,,
if I open a new Xwindows session on terminal 8 would it be possible to hook my laptop to a desktop computer platformed with linux and run an alternate session from the desktop on my laptop (on terminal 8 ) ......?
is this impossible, impractical or too far... (1 Reply)
Hello
a few Q's that if anyone knows the answer to i would be grateful:
:confused: when exiting a terminal session run through a windows environment i can either type exit or use ctrl +D. I was wondering if one way was a 'cleaner' method to exit then the other or whether it is executed the... (2 Replies)
I just moved from AIX 4 to AIX 5.3. the command `who am i` is essential to our logon scripts; but it does not work anymore, it says the process is not attached to a terminal. Is it possible to run this command remotely? It works for remote root sessions. If it is not is there another way to... (2 Replies)
I am running Putty 0.60 from Windows XP and I am connecting to a Linux box.
I would like to be able to pass a command line parameter to my Linux session so that my Linux session can execute a specific command, depending on the command line parameter. I have looked on the Internet and tried... (1 Reply)
Odd question and i am not even sure if it is possible, but if there a way to sned your current terminal session to another worksataion so you or another person can carry on using it,
background:
Fedora system using kconsole as the terminal
any thoughts, not really a massive but it has... (1 Reply)
How do I make terminal autorun commands at start up? For example, I have several windows of terminal, I want one to automatically run 'top' and a couple others autorun 'man' pages.
Is there any way I can do this? (1 Reply)
Hi all...
Consider me a dummy here...
I do not want any code or for anyone to show me how to do it at this time, but here is the question:-
I have had this brainstorm to be able to control the AudioScope.sh program in the "Shell Scripting And Programming" forum...
Is it possible, by... (4 Replies)
Hello everyone. I want to create an alias of vi, so that everytime I use vi to edit something, it will open up a new terminal session, with the vi file that I want to edit. So for example if I enter:
sudo vi /etc/bashrc
This will open up a brand new terminal window, with the /etc/bashrc file... (1 Reply)
Hi Admins,
Just a small question - Can we have multiple session for single user on HMC.
e.g. Can I have a terminal session (via IE ) and command line (ssh) at same time ??
I am not sure whether it will impact HMC system or not. So want to make sure.
let me know folks.
Thanks (3 Replies)
Hello every one.
I know little to nothing about AIX. Recently I have been assigned to an AIX project.
For some reason or another the find command is hanging the server.
Well it does not hand server per say, it just freezes my terminal session.
after running find, I waited up to 40 min and... (3 Replies)