Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e8b63e

Browse files
committed
Document some process group stuff; mkdir mode arg optional; mkfifo.
1 parent db9a7bb commit 1e8b63e

2 files changed

Lines changed: 110 additions & 2 deletions

File tree

Doc/lib/libposix.tex

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ \section{Built-in Module \sectcode{posix}}
150150
(Not on MS-DOS.)
151151
\end{funcdesc}
152152

153+
\begin{funcdesc}{getpgrp}{}
154+
Return the current process group id.
155+
(Not on MS-DOS.)
156+
\end{funcdesc}
157+
153158
\begin{funcdesc}{getpid}{}
154159
Return the current process id.
155160
(Not on MS-DOS.)
@@ -194,8 +199,25 @@ \section{Built-in Module \sectcode{posix}}
194199
without symbolic links, this is identical to \code{posix.stat}.)
195200
\end{funcdesc}
196201

197-
\begin{funcdesc}{mkdir}{path\, mode}
202+
\begin{funcdesc}{mkfifo}{path\optional{\, mode}}
203+
Create a FIFO (a POSIX named pipe) named \var{path} with numeric mode
204+
\var{mode}. The default \var{mode} is 0666 (octal). The current
205+
umask value is first masked out from the mode.
206+
(Not on MS-DOS.)
207+
208+
FIFOs are pipes that can be accessed like regular files. FIFOs exist
209+
until they are deleted (for example with \code{os.unlink}).
210+
Generally, FIFOs are used as rendez-vous between ``client'' and
211+
``server'' type processes: the server opens the FIFO for reading, and
212+
the client opens it for writing. Note that \code{mkfifo()} doesn't
213+
open the FIFO -- it just creates the rendez-vous point.
214+
\end{funcdesc}
215+
216+
\begin{funcdesc}{mkdir}{path\optional{\, mode}}
198217
Create a directory named \var{path} with numeric mode \var{mode}.
218+
The default \var{mode} is 0777 (octal). On some systems, \var{mode}
219+
is ignored. Where it is used, the current umask value is first
220+
masked out.
199221
\end{funcdesc}
200222

201223
\begin{funcdesc}{nice}{increment}
@@ -263,6 +285,25 @@ \section{Built-in Module \sectcode{posix}}
263285
(Not on MS-DOS.)
264286
\end{funcdesc}
265287

288+
\begin{funcdesc}{setpgrp}{}
289+
Calls the system call \code{setpgrp()} or \code{setpgrp(0, 0)}
290+
depending on which version is implemented (if any). See the {\UNIX}
291+
manual for the semantics.
292+
(Not on MS-DOS.)
293+
\end{funcdesc}
294+
295+
\begin{funcdesc}{setpgid}{pid\, pgrp}
296+
Calls the system call \code{setpgid()}. See the {\UNIX} manual for
297+
the semantics.
298+
(Not on MS-DOS.)
299+
\end{funcdesc}
300+
301+
\begin{funcdesc}{setsid}{}
302+
Calls the system call \code{setsid()}. See the {\UNIX} manual for the
303+
semantics.
304+
(Not on MS-DOS.)
305+
\end{funcdesc}
306+
266307
\begin{funcdesc}{setuid}{uid}
267308
Set the current process's user id.
268309
(Not on MS-DOS.)
@@ -304,6 +345,19 @@ \section{Built-in Module \sectcode{posix}}
304345
\code{system()}.
305346
\end{funcdesc}
306347

348+
\begin{funcdesc}{tcgetpgrp}{fd}
349+
Return the process group associated with the terminal given by
350+
\var{fd} (an open file descriptor as returned by \code{posix.open()}).
351+
(Not on MS-DOS.)
352+
\end{funcdesc}
353+
354+
\begin{funcdesc}{tcsetpgrp}{fd\, pg}
355+
Set the process group associated with the terminal given by
356+
\var{fd} (an open file descriptor as returned by \code{posix.open()})
357+
to \var{pg}.
358+
(Not on MS-DOS.)
359+
\end{funcdesc}
360+
307361
\begin{funcdesc}{times}{}
308362
Return a 5-tuple of floating point numbers indicating accumulated (CPU
309363
or other)

Doc/libposix.tex

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ \section{Built-in Module \sectcode{posix}}
150150
(Not on MS-DOS.)
151151
\end{funcdesc}
152152

153+
\begin{funcdesc}{getpgrp}{}
154+
Return the current process group id.
155+
(Not on MS-DOS.)
156+
\end{funcdesc}
157+
153158
\begin{funcdesc}{getpid}{}
154159
Return the current process id.
155160
(Not on MS-DOS.)
@@ -194,8 +199,25 @@ \section{Built-in Module \sectcode{posix}}
194199
without symbolic links, this is identical to \code{posix.stat}.)
195200
\end{funcdesc}
196201

197-
\begin{funcdesc}{mkdir}{path\, mode}
202+
\begin{funcdesc}{mkfifo}{path\optional{\, mode}}
203+
Create a FIFO (a POSIX named pipe) named \var{path} with numeric mode
204+
\var{mode}. The default \var{mode} is 0666 (octal). The current
205+
umask value is first masked out from the mode.
206+
(Not on MS-DOS.)
207+
208+
FIFOs are pipes that can be accessed like regular files. FIFOs exist
209+
until they are deleted (for example with \code{os.unlink}).
210+
Generally, FIFOs are used as rendez-vous between ``client'' and
211+
``server'' type processes: the server opens the FIFO for reading, and
212+
the client opens it for writing. Note that \code{mkfifo()} doesn't
213+
open the FIFO -- it just creates the rendez-vous point.
214+
\end{funcdesc}
215+
216+
\begin{funcdesc}{mkdir}{path\optional{\, mode}}
198217
Create a directory named \var{path} with numeric mode \var{mode}.
218+
The default \var{mode} is 0777 (octal). On some systems, \var{mode}
219+
is ignored. Where it is used, the current umask value is first
220+
masked out.
199221
\end{funcdesc}
200222

201223
\begin{funcdesc}{nice}{increment}
@@ -263,6 +285,25 @@ \section{Built-in Module \sectcode{posix}}
263285
(Not on MS-DOS.)
264286
\end{funcdesc}
265287

288+
\begin{funcdesc}{setpgrp}{}
289+
Calls the system call \code{setpgrp()} or \code{setpgrp(0, 0)}
290+
depending on which version is implemented (if any). See the {\UNIX}
291+
manual for the semantics.
292+
(Not on MS-DOS.)
293+
\end{funcdesc}
294+
295+
\begin{funcdesc}{setpgid}{pid\, pgrp}
296+
Calls the system call \code{setpgid()}. See the {\UNIX} manual for
297+
the semantics.
298+
(Not on MS-DOS.)
299+
\end{funcdesc}
300+
301+
\begin{funcdesc}{setsid}{}
302+
Calls the system call \code{setsid()}. See the {\UNIX} manual for the
303+
semantics.
304+
(Not on MS-DOS.)
305+
\end{funcdesc}
306+
266307
\begin{funcdesc}{setuid}{uid}
267308
Set the current process's user id.
268309
(Not on MS-DOS.)
@@ -304,6 +345,19 @@ \section{Built-in Module \sectcode{posix}}
304345
\code{system()}.
305346
\end{funcdesc}
306347

348+
\begin{funcdesc}{tcgetpgrp}{fd}
349+
Return the process group associated with the terminal given by
350+
\var{fd} (an open file descriptor as returned by \code{posix.open()}).
351+
(Not on MS-DOS.)
352+
\end{funcdesc}
353+
354+
\begin{funcdesc}{tcsetpgrp}{fd\, pg}
355+
Set the process group associated with the terminal given by
356+
\var{fd} (an open file descriptor as returned by \code{posix.open()})
357+
to \var{pg}.
358+
(Not on MS-DOS.)
359+
\end{funcdesc}
360+
307361
\begin{funcdesc}{times}{}
308362
Return a 5-tuple of floating point numbers indicating accumulated (CPU
309363
or other)

0 commit comments

Comments
 (0)