logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tcgetsid.3p (2282B)


  1. '\" et
  2. .TH TCGETSID "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. tcgetsid
  12. \(em get the process group ID for the session leader for the
  13. controlling terminal
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <termios.h>
  18. .P
  19. pid_t tcgetsid(int \fIfildes\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fItcgetsid\fR()
  24. function shall obtain the process group ID of the session for which the
  25. terminal specified by
  26. .IR fildes
  27. is the controlling terminal.
  28. .SH "RETURN VALUE"
  29. Upon successful completion,
  30. \fItcgetsid\fR()
  31. shall return the process group ID of the session associated with the
  32. terminal. Otherwise, a value of \-1 shall be returned and
  33. .IR errno
  34. set to indicate the error.
  35. .SH ERRORS
  36. The
  37. \fItcgetsid\fR()
  38. function shall fail if:
  39. .TP
  40. .BR EBADF
  41. The
  42. .IR fildes
  43. argument is not a valid file descriptor.
  44. .TP
  45. .BR ENOTTY
  46. The calling process does not have a controlling terminal, or the file
  47. is not the controlling terminal.
  48. .LP
  49. .IR "The following sections are informative."
  50. .SH EXAMPLES
  51. None.
  52. .SH "APPLICATION USAGE"
  53. None.
  54. .SH RATIONALE
  55. None.
  56. .SH "FUTURE DIRECTIONS"
  57. None.
  58. .SH "SEE ALSO"
  59. The Base Definitions volume of POSIX.1\(hy2017,
  60. .IR "\fB<termios.h>\fP"
  61. .\"
  62. .SH COPYRIGHT
  63. Portions of this text are reprinted and reproduced in electronic form
  64. from IEEE Std 1003.1-2017, Standard for Information Technology
  65. -- Portable Operating System Interface (POSIX), The Open Group Base
  66. Specifications Issue 7, 2018 Edition,
  67. Copyright (C) 2018 by the Institute of
  68. Electrical and Electronics Engineers, Inc and The Open Group.
  69. In the event of any discrepancy between this version and the original IEEE and
  70. The Open Group Standard, the original IEEE and The Open Group Standard
  71. is the referee document. The original Standard can be obtained online at
  72. http://www.opengroup.org/unix/online.html .
  73. .PP
  74. Any typographical or formatting errors that appear
  75. in this page are most likely
  76. to have been introduced during the conversion of the source files to
  77. man page format. To report such errors, see
  78. https://www.kernel.org/doc/man-pages/reporting_bugs.html .