File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/uucore/src/lib/features Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
// spell-checker:ignore (vars) cvar exitstatus cmdline kworker getsid getpid
7
7
// spell-checker:ignore (sys/unix) WIFSIGNALED ESRCH
8
- // spell-checker:ignore pgrep pwait snice
8
+ // spell-checker:ignore pgrep pwait snice getpgrp
9
9
10
10
use libc:: { gid_t, pid_t, uid_t} ;
11
11
#[ cfg( not( target_os = "redox" ) ) ]
@@ -23,6 +23,12 @@ pub fn geteuid() -> uid_t {
23
23
unsafe { libc:: geteuid ( ) }
24
24
}
25
25
26
+ /// `getpgrp()` returns the process group ID of the calling process.
27
+ /// It is a trivial wrapper over libc::getpgrp to "hide" the unsafe
28
+ pub fn getpgrp ( ) -> pid_t {
29
+ unsafe { libc:: getpgrp ( ) }
30
+ }
31
+
26
32
/// `getegid()` returns the effective group ID of the calling process.
27
33
pub fn getegid ( ) -> gid_t {
28
34
unsafe { libc:: getegid ( ) }
You can’t perform that action at this time.
0 commit comments