21.01.2014 Views

Lab 3 - IDA

Lab 3 - IDA

Lab 3 - IDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Lab</strong> 3: Situations with Wait<br />

• Child exits before the parent and:<br />

– parent will exit without calling wait().<br />

Child<br />

exit(0)<br />

keep the exit value<br />

Destroy the exit value!<br />

Parent<br />

exec(Child)<br />

exit(0)<br />

You should keep child’s exit value until the parent exits<br />

(since the child doesn’t know if the parent calls wait() later on)<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!