PREV INDEX NEXT

Author: Unknown
Subject: [response] example of wait built-in
Date: Thursday, 10 Dec 2020, 09:35:03

Since a parent waitpids for its child for all but backgrounded commands, the built-in wait only has to wait for any backgrounded commands (if there are any). Take the following example, sleep 15 is backgrounded and then "wait" waits for sleep 15 to finish before returning.


[xxx@bumblebee hwk5]$ /c/cs323/Hwk5/bashLT
(1)$ sleep 15 &
Backgrounded: 618997
(2)$ wait
Completed: 618997 (0)
(3)$
PREV INDEX NEXT