bjh 00/01/10 08:01:58
Modified:src/lib/apr/test testproc.c
Log:
I don't think sleeping for 1000 seconds is what we want to do here. Switch
it for a child wait which is more appropriate and tests another function.
Revision ChangesPath
1.10 +7 -1 apache-2.0/src/lib/apr/test/testproc.c
Index: testproc.c
===
RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testproc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- testproc.c2000/01/04 19:00:49 1.9
+++ testproc.c2000/01/10 16:01:57 1.10
@@ -168,7 +168,13 @@
}
else fprintf(stderr, Read failed.\n);
-sleep(1000);
+fprintf(stdout, Waiting for child to die...);
+if (ap_wait_proc(newproc, APR_WAIT) != APR_CHILD_DONE) {
+fprintf(stderr, Wait for child failed\n);
+exit(-1);
+}
+fprintf(stdout, OK\n);
+
fprintf(stdout, Removing directory...);
if (ap_remove_dir(proctest, context) != APR_SUCCESS) {
fprintf(stderr, Could not remove directory.\n);