Provided by: manpages-ja-dev_0.5.0.0.20221215+dfsg-1_all bug

名前

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

書式

       #include <unistd.h>
       #include <sys/types.h>

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

説明

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

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

エラー

       これらの関数は常に成功する。

準拠

       POSIX.1-2001, POSIX.1-2008, 4.3BSD.

注意

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

       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.

関連項目

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

この文書について

       この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの
       説明とバグ報告に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。