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

📄 wait.2

📁 UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱昂氏unix源代码分析都是用的该版
💻 2
字号:
.th WAIT II 2/9/75.sh NAMEwait \*- wait for process to terminate.sh SYNOPSIS(wait = 7.).br.ft Bsys  wait.ft R.br(process ID in r0).br(status in r1).s3.ft Bwait(status).brint *status;.ft R.sh DESCRIPTION.it Waitcauses its caller to delay until one of its childprocesses terminates.If any child has died since the last.it wait,return is immediate;if there are no children, return is immediate withthe error bit set(resp. with a value of \*-1 returned).The normal return yields the process ID of the terminated child(in r0).In the case of several children several.it waitcalls are neededto learn of all the deaths..s3If no error is indicated on return,the r1 high byte (resp. the high byte stored into.it status) contains the low byte of thechild process r0 (resp. the argument of.it exit) when it terminated.The r1 (resp..it status) low byte contains the termination statusof the process.See signal (II) fora list of termination statuses (signals);0 status indicates normal termination.A special status (0177) is returned for a stopped processwhich has not terminated and can be restarted.See ptrace (II).If the 0200 bit of the termination statusis set,a core image of the process was producedby the system..s3If the parent process terminates withoutwaiting on its children,the initialization process(process ID = 1)inherits the children..sh "SEE ALSO"exit (II), fork (II), signal (II).sh DIAGNOSTICSThe error bit(c-bit) is set if there are no children not previously waited for.From C, a returned value of \*-1 indicates an error.

⌨️ 快捷键说明

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