Merge pull request #273 from joncham/bug-getpid
authorAlex Rønne Petersen <alex@lycus.org>
Sat, 12 Apr 2014 08:29:38 +0000 (10:29 +0200)
committerAlex Rønne Petersen <alex@lycus.org>
Sat, 12 Apr 2014 08:29:38 +0000 (10:29 +0200)
Use getpid instead of GetCurrentProcessId as the latter calls into io-la...

mono/mini/debugger-agent.c

index 27c785afc0c2c149ee7b0b49f83922da6424deca..9eb0c294976101e19a897b123a68ea96c221124d 100644 (file)
@@ -895,7 +895,7 @@ mono_debugger_agent_parse_options (char *options)
                /* Waiting for deferred attachment */
                agent_config.defer = TRUE;
                if (agent_config.address == NULL) {
-                       agent_config.address = g_strdup_printf ("0.0.0.0:%u", 56000 + (GetCurrentProcessId () % 1000));
+                       agent_config.address = g_strdup_printf ("0.0.0.0:%u", 56000 + (getpid () % 1000));
                }
        }