.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified by Michael Haardt (michael@moria.de) .\" Modified Sat Jul 24 13:22:07 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified 21 Aug 1994 by Michael Chastain (mec@shell.portal.com): .\" Referenced 'clone(2)'. .\" Modified 1995-06-10, 1996-04-18, 1999-11-01, 2000-12-24 .\" by Andries Brouwer (aeb@cwi.nl) .\" .TH FORK 2 "10 June 1995" "Linux 1.2.9" "Linux Programmeurs Handleiding" .SH NAAM fork \- maak een kindproces .SH OVERZICHT .B #include .br .B #include .sp .B pid_t fork(void); .SH BESCHRIJVING .B fork() Maakt een kindproces dat alleen van zijn ouderproces verschilt in zijn PID, PPID, in dat systeemmiddelen gebruik op `0' is gezet, en in het feit dat bestandvergrendelingen en nog hangende signalen niet worden geërfd. .PP Onder Linux is .B fork() uitgevoert met kopieër-als-schrijf {copy-on-write} pagina's, de enige straf voor een .B fork() is dus de tijd en het geheugen die het kost om de pagina-tabellen van de ouder na te maken, en het maken van een unieke taakstructuur voor het kind. .SH "EIND WAARDE" Bij success wordt de PID van het kindproces teruggegeven in het ouderproces en wordt 0 teruggegeven in het kindproces. Bij falen wordt \-1 teruggegeven in het ouderproces, er wordt geen kind gemaakt, en .I errno wordt naar behoren gezet. .SH FOUTEN .TP .B EAGAIN {opnieuw} .BR fork() Kon niet genoeg geheugen krijgen om de paginatabellen van de ouder te kopieëren, en om een taak structuur voor het kind in op te bergen. .TP .B ENOMEM {geen geheugen} .BR fork() Faalde in het vrijmaken van de nodige kernel structuren omdat er te weinig geheugen was. .SH "VOLDOET AAN" De .BR fork() aanroep voldoet aan SVr4, SVID, POSIX, X/OPEN, BSD 4.3. .SH "ZIE OOK" .BR clone "(2) {klonen}," .BR execve "(2) {uitvoeren}," .BR vfork "(2) {splitsen}," .BR wait "(2) {wachten} .\" Translated to Dutch 6 Nov 2000 by Jos Boersema .\" .SH VERTALING Dit is een handleiding uit \fBmanpages-dev 1.34\fR. Alles wat tussen `\fB{\fR'..`\fB}\fR' staat is \fBaanvullende vertaling\fR, en hoort \fBniet\fR bij de originele handleiding. Email naar . .\"Vertaling Jos Boersema $Id: fork.2,v 1.1 2003/04/28 18:43:34 bokkie Exp $