diff options
author | Michael Brown | 2007-01-19 15:10:13 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-19 15:10:13 +0100 |
commit | b6194b8cb9e4409a8eb3ae42acd17353a9598e1d (patch) | |
tree | 5f6443af169fdd9dd0d053f67c4a54abf4869852 /src/core/resolv.c | |
parent | Propagate return status code from last child to fail. (diff) | |
download | ipxe-b6194b8cb9e4409a8eb3ae42acd17353a9598e1d.tar.gz ipxe-b6194b8cb9e4409a8eb3ae42acd17353a9598e1d.tar.xz ipxe-b6194b8cb9e4409a8eb3ae42acd17353a9598e1d.zip |
Note that the SIGCHLD handler could be re-entered.
Diffstat (limited to 'src/core/resolv.c')
-rw-r--r-- | src/core/resolv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/resolv.c b/src/core/resolv.c index 60195ba9..d52c7481 100644 --- a/src/core/resolv.c +++ b/src/core/resolv.c @@ -103,8 +103,14 @@ static void resolv_sigchld ( struct async *async, container_of ( async, struct resolution, async ); int rc; - /* If this child succeeded, kill all the others and return */ + /* Reap the child */ async_wait ( async, &rc, 1 ); + + /* If this child succeeded, kill all the others and return. + * Killing the others means that this routine may be + * re-entered; this is safe provided that no child returns a + * success exit status when killed by SIGKILL. + */ if ( rc == 0 ) { async_signal_children ( async, SIGKILL ); async_done ( async, 0 ); |