?? fork.2
字號:
.TH FORK 2 .SH NAMEfork \- spawn new process.SH SYNOPSIS.B fork( ).SH DESCRIPTION.I Forkis the only way new processes are created.The new process's core image is a copy ofthat of the caller of.IR fork .The only distinctionis the factthat the value returned in the old (parent) processcontains the process IDof the new (child) process,while the value returned in the child is 0.Process ID's range from 1 to 30,000.This process ID is used by.IR wait (2)..PPFiles open before the forkare shared, and have a common read-write pointer.In particular,this is the way that standard input and outputfiles are passed and also howpipes are set up..SH "SEE ALSO"wait(2), exec(2).SH DIAGNOSTICSReturns \-1 and fails to create a process if:there is inadequate swap space,the user is not super-user and has too many processes,or the system's process table is full.Only the super-user can take the last process-table slot..SH ASSEMBLER(fork = 2.).br.B sys fork.br(new process return).br(old process return, new process ID in r0).PPThe return locations in the old and new processdiffer by one word.The C-bit is set in the old process if a newprocess could not be created.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -