Files
oldlinux-files/Ref-docs/syscalls/syscalls_66.html
2024-02-19 00:21:47 -05:00

31 lines
1.5 KiB
HTML

<html><!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - setgid</TITLE>
<P>Go to the <A HREF="syscalls_65.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_65.html">previous</A>, <A HREF="syscalls_67.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_67.html">next</A> section.<P>
<H2><A NAME="SEC66" HREF="syscalls_toc.html#SEC66" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC66">setgid</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int setgid(gid_t <VAR>gid</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>gid</VAR>: [in] the new gid.
<P>
<H3>DESCRIPTION</H3>
<P>
If the calling task does not have superuser privileges, it may use
<CODE>setgid</CODE> to sets its effective gid to its saved gid or its real gid
(other values are illegal). If the calling task has superuser
privileges, the real, effective and saved gids are set to <VAR>gid</VAR>.
<P>
<H3>RETURN VALUE</H3>
<P>
On success, returns 0. On error, returns -1 and <CODE>errno</CODE> is set
to one of the following values: <CODE>EPERM</CODE>: the <VAR>gid</VAR> is not the
real gid or the saved gid of the task and the task does not have
superuser privileges.
<P>
<P>Go to the <A HREF="syscalls_65.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_65.html">previous</A>, <A HREF="syscalls_67.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_67.html">next</A> section.<P>