fix and refactor child reaping logic in wordexp
authorRich Felker <dalias@aerifal.cx>
Fri, 22 Nov 2013 21:29:31 +0000 (16:29 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 22 Nov 2013 21:29:31 +0000 (16:29 -0500)
commitaeea71dc042d8d0a05f4293a0e98c9cd009ffc16
tree4f281963809413f618a9edfa5dfdff813c16031e
parentcaaf7d443d8f502a209cb5489c45ddcccbebdd34
fix and refactor child reaping logic in wordexp

loop condition was incorrect and confusing and caused an infinite loop
when (broken) applications reaped the pid from a signal handler or
another thread before wordexp's call to waitpid could do so.
src/misc/wordexp.c