⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fork.2

📁 莱昂氏UNIX源代码分析UNIXv6src.tar.gz
💻 2
字号:
.th FORK II 8/5/73.sh NAMEfork  \*-  spawn new process.sh SYNOPSIS(fork = 2.).br.ft Bsys fork.br.ft R(new process return).br(old process return).s3.ft Bfork( ).ft R.sh DESCRIPTION.it Forkis the only way new processes are created.The new process's core image is a copy ofthat of the caller of.it fork.The only distinctionis the return location and the factthat r0 in the old (parent) process contains the process IDof the new (child) process.This process ID is used by.it wait..s3The two returning processes share all openfiles that existed before the call.In particular,this is the way that standard input and outputfiles are passed and also howpipes are set up..s3From C, the child process receives a 0 return,and the parent receives a non-zero number which is the process IDof the child;a return of \*-1 indicates inabilityto create a new process..sh "SEE ALSO"wait (II), exec (II).sh DIAGNOSTICSThe error bit(c-bit) is set in the old process if a new processcould not be created because of lack of process space.From C, a return of \*-1 (not just negative)indicates an error.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -