Use wait2 to get exit status

Not sure about this one though I find it more idiomatic.