fork.2, getsid.2, setpgid.2, setsid.2: Include <sys/types.h> in SYNOPSIS for pid_t

vfork(2), getpid(2) and others which return pid_t already do this.

mtk: Additional info from Ahmad: <unistd.h> defines 'pid_t',
but only dependent on certain FTMs beng defined.

Cc: linux-man@vger.kernel.org
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Ahmad Fatoum 2017-11-12 14:29:21 +01:00 committed by Michael Kerrisk
parent 42cfb3552b
commit cc94f6aa19
4 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,8 @@
.SH NAME
fork \- create a child process
.SH SYNOPSIS
.B #include <sys/types.h>
.br
.B #include <unistd.h>
.PP
.B pid_t fork(void);

View File

@ -28,6 +28,8 @@
.SH NAME
getsid \- get session ID
.SH SYNOPSIS
.B #include <sys/types.h>
.br
.B #include <unistd.h>
.PP
.BI "pid_t getsid(pid_t" " pid" );

View File

@ -49,6 +49,8 @@
.SH NAME
setpgid, getpgid, setpgrp, getpgrp \- set/get process group
.SH SYNOPSIS
.B #include <sys/types.h>
.br
.B #include <unistd.h>
.PP
.BI "int setpgid(pid_t " pid ", pid_t " pgid );

View File

@ -33,6 +33,8 @@
setsid \- creates a session and sets the process group ID
.SH SYNOPSIS
.ad l
.B #include <sys/types.h>
.br
.B #include <unistd.h>
.PP
.B pid_t setsid(void);