Hrvoje Niksic wrote:
Thanks for the patch, I've now applied it to CVS.

You might want to add a comment in front of fake_fork() explaining
what it does, and why.  The comment doesn't have to be long, only
several sentences so that someone reading the code later understands
what the heck a "fake fork" is and why we're performing it.

Ok, I hope this is sufficient.


Cheers
Index: src/mswindows.c
===================================================================
RCS file: /pack/anoncvs/wget/src/mswindows.c,v
retrieving revision 1.30
diff -u -r1.30 mswindows.c
--- src/mswindows.c     2004/03/24 19:16:08     1.30
+++ src/mswindows.c     2004/03/24 23:52:59
@@ -202,7 +202,14 @@
   return 1;                     /* We are the child.  */
 }
 
-
+/* Windows doesn't support the fork() call; so we fake it by invoking
+   another copy of Wget with the same arguments with which we were
+   invoked.  The child copy of Wget should perform the same initialization
+   sequence as the parent; so we should have two processes that are
+   essentially identical.  We create a specially named section object that
+   allows the child to distinguish itself from the parent and is used to
+   exchange information between the two processes.  We use an event object
+   for synchronization.  */
 static void
 fake_fork (void)
 {
@@ -343,6 +350,8 @@
   /* We failed, return.  */
 }
 
+/* This is the corresponding Windows implementation of the
+   fork_to_background() function in utils.c.  */
 void
 fork_to_background (void)
 {

Reply via email to