Merge pull request #2721 from ludovic-henry/fix-mono_ms_ticks
[mono.git] / mono / io-layer / processes.c
index d54f84bd3242abb26c69473631f355fb4d1f5512..913f0b8af4b43604a528192492512caff7fac786 100644 (file)
@@ -6,6 +6,7 @@
  *
  * (C) 2002-2011 Novell, Inc.
  * Copyright 2011 Xamarin Inc
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 
 #include <config.h>
@@ -1286,7 +1287,8 @@ GetExitCodeProcess (gpointer process, guint32 *code)
                        *code = STILL_ACTIVE;
                        return TRUE;
                } else {
-                       return FALSE;
+                       *code = -1;
+                       return TRUE;
                }
        }
 
@@ -2725,8 +2727,7 @@ process_wait (gpointer handle, guint32 timeout, gboolean alertable)
        WapiHandle_process *process_handle;
        pid_t pid G_GNUC_UNUSED, ret;
        int status;
-       guint32 start;
-       guint32 now;
+       gint64 start, now;
        struct MonoProcess *mp;
 
        /* FIXME: We can now easily wait on processes that aren't our own children,