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

getpgid.3p (2644B)


  1. '\" et
  2. .TH GETPGID "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. getpgid
  12. \(em get the process group ID for a process
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <unistd.h>
  17. .P
  18. pid_t getpgid(pid_t \fIpid\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIgetpgid\fR()
  23. function shall return the process group ID of the process whose process
  24. ID is equal to
  25. .IR pid .
  26. If
  27. .IR pid
  28. is equal to 0,
  29. \fIgetpgid\fR()
  30. shall return the process group ID of the calling process.
  31. .SH "RETURN VALUE"
  32. Upon successful completion,
  33. \fIgetpgid\fR()
  34. shall return a process group ID. Otherwise, it shall return
  35. (\fBpid_t\fP)\-1 and set
  36. .IR errno
  37. to indicate the error.
  38. .SH ERRORS
  39. The
  40. \fIgetpgid\fR()
  41. function shall fail if:
  42. .TP
  43. .BR EPERM
  44. The process whose process ID is equal to
  45. .IR pid
  46. is not in the same session as the calling process, and the
  47. implementation does not allow access to the process group ID of that
  48. process from the calling process.
  49. .TP
  50. .BR ESRCH
  51. There is no process with a process ID equal to
  52. .IR pid .
  53. .P
  54. The
  55. \fIgetpgid\fR()
  56. function may fail if:
  57. .TP
  58. .BR EINVAL
  59. The value of the
  60. .IR pid
  61. argument is invalid.
  62. .LP
  63. .IR "The following sections are informative."
  64. .SH EXAMPLES
  65. None.
  66. .SH "APPLICATION USAGE"
  67. None.
  68. .SH RATIONALE
  69. None.
  70. .SH "FUTURE DIRECTIONS"
  71. None.
  72. .SH "SEE ALSO"
  73. .IR "\fIexec\fR\^",
  74. .IR "\fIfork\fR\^(\|)",
  75. .IR "\fIgetpgrp\fR\^(\|)",
  76. .IR "\fIgetpid\fR\^(\|)",
  77. .IR "\fIgetsid\fR\^(\|)",
  78. .IR "\fIsetpgid\fR\^(\|)",
  79. .IR "\fIsetsid\fR\^(\|)"
  80. .P
  81. The Base Definitions volume of POSIX.1\(hy2017,
  82. .IR "\fB<unistd.h>\fP"
  83. .\"
  84. .SH COPYRIGHT
  85. Portions of this text are reprinted and reproduced in electronic form
  86. from IEEE Std 1003.1-2017, Standard for Information Technology
  87. -- Portable Operating System Interface (POSIX), The Open Group Base
  88. Specifications Issue 7, 2018 Edition,
  89. Copyright (C) 2018 by the Institute of
  90. Electrical and Electronics Engineers, Inc and The Open Group.
  91. In the event of any discrepancy between this version and the original IEEE and
  92. The Open Group Standard, the original IEEE and The Open Group Standard
  93. is the referee document. The original Standard can be obtained online at
  94. http://www.opengroup.org/unix/online.html .
  95. .PP
  96. Any typographical or formatting errors that appear
  97. in this page are most likely
  98. to have been introduced during the conversion of the source files to
  99. man page format. To report such errors, see
  100. https://www.kernel.org/doc/man-pages/reporting_bugs.html .