commit | de0b5156782633e14135291b6f609cd3a14bec20 | [log] [tgz] |
---|---|---|
author | Tao Wu <lepton@google.com> | Tue Feb 16 10:13:48 2016 -0800 |
committer | Tao Wu <lepton@google.com> | Tue Feb 16 10:13:48 2016 -0800 |
tree | e17252f4e251ad18273521d16d4836a81c478446 | |
parent | 5ec63b6f3c2671ce79f00b602ffeee6f889ad06a [diff] |
Don't go busy loop when waiting child process. Before this change, code works like this: after gets POLLHUP from poll, it just go a busy loop to do poll -> waitpid -> poll -> waitpid ... until child process really exit. This doesn't make sense and is waste of CPU. Change-Id: If6cd8b0245587d623e309c3ae27f162e1c7ef504 Signed-off-by: Tao Wu <lepton@google.com>