add directory Ref-docs
This commit is contained in:
47
Ref-docs/syscalls/syscalls_62.html
Normal file
47
Ref-docs/syscalls/syscalls_62.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<html><!-- This HTML file has been created by texi2html 1.29
|
||||
from syscalls.texi on 4 June 1994 -->
|
||||
|
||||
<TITLE>Syscall specifications of Linux - getpgrp</TITLE>
|
||||
<P>Go to the <A HREF="syscalls_61.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_61.html">previous</A>, <A HREF="syscalls_63.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_63.html">next</A> section.<P>
|
||||
<H2><A NAME="SEC62" HREF="syscalls_toc.html#SEC62" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC62">getpgrp, setpgid and setpgrp</A></H2>
|
||||
<P>
|
||||
<H3>SYNOPSIS</H3>
|
||||
<P>
|
||||
<CODE>pid_t getpgrp(void);</CODE>
|
||||
<P>
|
||||
<CODE>int setpgid(pid_t <VAR>pid</VAR>, pid_t <VAR>pgid</VAR>);</CODE>
|
||||
<P>
|
||||
<CODE>int setpgrp(void);</CODE>
|
||||
<P>
|
||||
<H3>PARAMETERS</H3>
|
||||
<P>
|
||||
<VAR>pid</VAR>: [in] the task to modify (0 for the current task).
|
||||
<P>
|
||||
<VAR>pgid</VAR>: [in] the new process group id. If zero is specified, the
|
||||
value of <VAR>pid</VAR> is taken.
|
||||
<P>
|
||||
<H3>DESCRIPTION</H3>
|
||||
<P>
|
||||
<CODE>getpgrp</CODE> returns the current process group. <CODE>setpgid</CODE> sets
|
||||
the process group id of the task specified by <VAR>pid</VAR> to <VAR>pgid</VAR>.
|
||||
<CODE>setpgrp</CODE> sets the group id of the current task to its process id.
|
||||
<P>
|
||||
Note: <CODE>setpgrp</CODE> is implemented as <CODE>setpgid(0,0)</CODE>.
|
||||
<P>
|
||||
<H3>RETURN VALUE</H3>
|
||||
<P>
|
||||
<VAR>getpgrp</VAR> allways succeed and returns the current process group id.
|
||||
<P>
|
||||
On success, <CODE>setpgrp</CODE> and <CODE>setgpid</CODE> return zero. On error,
|
||||
they return -1 and <CODE>errno</CODE> is set to one of the following values:
|
||||
<P>
|
||||
For <VAR>setpgid</VAR>:
|
||||
<P>
|
||||
<UL>
|
||||
<LI><CODE>EINVAL</CODE>: pgid is less than 0.
|
||||
<LI><CODE>ESRCH</CODE>.
|
||||
</UL>
|
||||
<P>
|
||||
For both calls: <CODE>EPERM</CODE>.
|
||||
<P>
|
||||
<P>Go to the <A HREF="syscalls_61.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_61.html">previous</A>, <A HREF="syscalls_63.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_63.html">next</A> section.<P>
|
||||
Reference in New Issue
Block a user