Browse Source

Note that the SIGCHLD handler could be re-entered.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
b6194b8cb9
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/core/resolv.c

+ 7
- 1
src/core/resolv.c View File

103
 		container_of ( async, struct resolution, async );
103
 		container_of ( async, struct resolution, async );
104
 	int rc;
104
 	int rc;
105
 
105
 
106
-	/* If this child succeeded, kill all the others and return */
106
+	/* Reap the child */
107
 	async_wait ( async, &rc, 1 );
107
 	async_wait ( async, &rc, 1 );
108
+
109
+	/* If this child succeeded, kill all the others and return.
110
+	 * Killing the others means that this routine may be
111
+	 * re-entered; this is safe provided that no child returns a
112
+	 * success exit status when killed by SIGKILL.
113
+	 */
108
 	if ( rc == 0 ) {
114
 	if ( rc == 0 ) {
109
 		async_signal_children ( async, SIGKILL );
115
 		async_signal_children ( async, SIGKILL );
110
 		async_done ( async, 0 );
116
 		async_done ( async, 0 );

Loading…
Cancel
Save