OSDN Git Service

* fork.cc (fork_parent): Record child's pid when we're sure that it has been
authorcgf <cgf>
Mon, 30 Aug 2004 22:08:49 +0000 (22:08 +0000)
committercgf <cgf>
Mon, 30 Aug 2004 22:08:49 +0000 (22:08 +0000)
filled out by the child.
* pinfo.cc (pinfo::init): Trivial change.

winsup/cygwin/ChangeLog
winsup/cygwin/fork.cc
winsup/cygwin/pinfo.cc

index 7dc1cf2..286f9a6 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-30  Christopher Faylor  <cgf@timesys.com>
+
+       * fork.cc (fork_parent): Record child's pid when we're sure that it has
+       been filled out by the child.
+       * pinfo.cc (pinfo::init): Trivial change.
+
 2004-08-29  Corinna Vinschen  <corinna@vinschen.de>
 
        * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Allow to report
index 0103b0d..0d42419 100644 (file)
@@ -514,8 +514,6 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
 
   int forked_pid;
 
-  forked_pid = forked->pid;
-
   /* Initialize things that are done later in dll_crt0_1 that aren't done
      for the forkee.  */
   strcpy (forked->progname, myself->progname);
@@ -552,6 +550,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
   if (!sync_with_child (pi, subproc_ready, true, "waiting for longjmp"))
     goto cleanup;
 
+  forked_pid = forked->pid;
   /* CHILD IS STOPPED */
   debug_printf ("child is alive (but stopped)");
 
index 82ea74d..4156ef0 100644 (file)
@@ -170,7 +170,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h)
        }
       else if (!createit)
        {
-         h = OpenFileMappingA (access, FALSE, mapname);
+         h = OpenFileMapping (access, FALSE, mapname);
          created = 0;
        }
       else