?? wait.2
字號:
.TH WAIT 2 .SH NAMEwait \- wait for process to terminate.SH SYNOPSIS.B wait(status).br.B int *status;.PP.B wait(0).SH DESCRIPTION.I Waitcauses its caller to delay until a signal is received orone of its childprocesses terminates.If any child has died since the last.I 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 the case of several children several.I waitcalls are neededto learn of all the deaths..PPIf.RI (int) statusis nonzero, the high byte of the word pointed toreceives the low byte of theargument of.I exitwhen the child terminated.The low bytereceives the termination statusof the process.See.IR signal (2)for a 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.IR ptrace (2).If the 0200 bit of the termination statusis set,a core image of the process was producedby the system..PPIf the parent process terminates withoutwaiting on its children,the initialization process(process ID = 1)inherits the children..SH "SEE ALSO"exit(2), fork(2), signal(2).SH DIAGNOSTICSReturns\-1 if there are no children not previously waited for..SH ASSEMBLER(wait = 7.).br.B sys wait.br(process ID in r0).br(status in r1).PPThe high byte of the status isthe low byte of r0 in the child at termination.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -