Merge pull request #1323 from StephenMcConnel/bug-23591
[mono.git] / mono / io-layer / handles.c
index 5e706fb7280252ca41d3d5c07e66274ad333a435..dbad6679487498411ed28f0931687ced575fb910 100644 (file)
@@ -42,6 +42,7 @@
 #include <mono/io-layer/process-private.h>
 
 #include <mono/utils/mono-mutex.h>
+#include <mono/utils/mono-proclib.h>
 #undef DEBUG_REFS
 
 #if 0
@@ -286,12 +287,12 @@ wapi_init (void)
 
        wapi_processes_init ();
 
-       /* Using g_atexit here instead of an explicit function call in
+       /* Using atexit here instead of an explicit function call in
         * a cleanup routine lets us cope when a third-party library
         * calls exit (eg if an X client loses the connection to its
         * server.)
         */
-       g_atexit (handle_cleanup);
+       mono_atexit (handle_cleanup);
 }
 
 void
@@ -1818,8 +1819,6 @@ static void _wapi_handle_check_share_by_pid (struct _WapiFileShare *share_info)
 void _wapi_handle_check_share (struct _WapiFileShare *share_info, int fd)
 {
        gboolean found = FALSE, proc_fds = FALSE;
-       pid_t self = _wapi_getpid ();
-       int pid;
        int thr_ret, i;
        
        /* Prevents entries from expiring under us if we remove this