_geteuid.c

来自「操作系统源代码」· C语言 代码 · 共 17 行

C
17
字号
#include <lib.h>#define geteuid	_geteuid#include <unistd.h>PUBLIC uid_t geteuid(){  message m;  /* POSIX says that this function is always successful and that no   * return value is reserved to indicate an error.  Minix syscalls   * are not always successful and Minix returns the unreserved value   * (uid_t) -1 when there is an error.   */  if (_syscall(MM, GETUID, &m) < 0) return ( (uid_t) -1);  return( (uid_t) m.m2_i1);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?