GETGID

Section: Linux Programmer's Manual (2)
Updated: 2019-03-06
Index JM Home Page
 

名前

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/ に書かれている。

関連キーワード

getgid   getegid   グループ   pages   Index   書式   準拠   ビット   pair   system   関連   項目   文書   Content   type   text   charset   Section   Programmer   Return   Main   Contents   unistd   types   実効

Linux マニュアル 一覧

関連するコマンド・関数

getegid.2   getgid.2   getgid32.2   getresgid32.2   geteuid32.2   id.1
 

Index

名前
書式
説明
エラー
準拠
注意
関連項目
この文書について

This document was created by man2html, using the manual pages.
Time: 04:38:59 GMT, October 11, 2026