We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d0b170 commit 1ba7fe0Copy full SHA for 1ba7fe0
src/unistd.rs
@@ -151,6 +151,17 @@ pub fn tcsetpgrp(fd: c_int, pgrp: pid_t) -> Result<()> {
151
Errno::result(res).map(drop)
152
}
153
154
+
155
+/// Get the group id of the calling process (see
156
+///[getpgrp(3)](http://man7.org/linux/man-pages/man3/getpgrp.3p.html)).
157
+///
158
+/// Get the process group id (PGID) of the calling process.
159
+/// According to the man page it is always successful.
160
+#[inline]
161
+pub fn getpgrp() -> pid_t {
162
+ unsafe { libc::getpgrp() }
163
+}
164
165
/// Get the caller's thread ID (see
166
/// [gettid(2)](http://man7.org/linux/man-pages/man2/gettid.2.html).
167
///
0 commit comments