blob: cdf87be21945036e3b6d4a20207891265d572385 [file] [log] [blame] [view] [edit]
When a `Process` goes out of scope, its `drop` method will *wait* until the
child process finishes before releasing the resource.
{wait.rs}
```
$ rustc wait.rs && ./wait
reached end of main
# `wait` keeps running for 5 seconds
# `sleep 5` command ends, and then our `wait` program finishes
```