getgid

Section: System Calls (2)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

getgid, getegid - グループ ID を得る  

ライブラリ

標準 C ライブラリ (libc,~-lc)  

書式

#include <unistd.h>

gid_t getgid(void);
gid_t getegid(void);
 

説明

getgid() は呼び出し元のプロセスの実グループ ID を返す。

getegid() は呼び出し元のプロセスの実効グループ ID を返す。  

エラー

These functions are always successful and never modify errno.  

バージョン

On Alpha, instead of a pair of getgid() and getegid() system calls, a single getxgid() system call is provided, which returns a pair of real and effective GIDs. The glibc getgid() and getegid() wrapper functions transparently deal with this. See syscall(2) for details regarding register mapping.  

標準規格

POSIX.1-2024.  

歴史

4.3BSD, POSIX.1-1988.

元々の Linux の getgid() と getegid() システムコールは 16 ビットのグループ ID だけに対応していた。 その後、Linux 2.4 で、32 ビットの ID に対応した getgid32() と getegid32() が追加された。 glibc の getgid() と getegid() のラッパー関数は カーネルバージョンによるこの違いを吸収している。  

関連項目

getresgid(2), setgid(2), setregid(2), credentials(7)


 

Index

名前
ライブラリ
書式
説明
エラー
バージョン
標準規格
歴史
関連項目

This document was created by man2html, using the manual pages.