Skip to content

Commit

Permalink
2006-10-12 Dick Porter <dick@ximian.com>
Browse files Browse the repository at this point in the history
        * processes.c (_wapi_process_reap): Unref a process handle if we
        reaped it, found by Zoltan.  Fixes bug 79286.
        (process_wait): Don't wait again if we've already waited for a
        process.



svn path=/trunk/mono/; revision=66619
  • Loading branch information
dickp committed Oct 12, 2006
1 parent f9ab45a commit 104931c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions mono/io-layer/ChangeLog
@@ -1,3 +1,10 @@
2006-10-12 Dick Porter <dick@ximian.com>

* processes.c (_wapi_process_reap): Unref a process handle if we
reaped it, found by Zoltan. Fixes bug 79286.
(process_wait): Don't wait again if we've already waited for a
process.

2006-10-11 Sergey Tikhonov <tsv@solvo.ru>

* atomic.h: Fix atomic decrement.
Expand Down
16 changes: 15 additions & 1 deletion mono/io-layer/processes.c
Expand Up @@ -162,6 +162,11 @@ void _wapi_process_reap (void)
#endif

process_set_termination_details (proc, status);

/* _wapi_search_handle adds a reference, so
* drop it here
*/
_wapi_handle_unref (proc);
}
} while (proc != NULL);
}
Expand All @@ -180,6 +185,16 @@ static guint32 process_wait (gpointer handle, guint32 timeout)
#ifdef DEBUG
g_message ("%s: Waiting for process %p", __func__, handle);
#endif

if (_wapi_handle_issignalled (handle)) {
/* We've already done this one */
#ifdef DEBUG
g_message ("%s: Process %p already signalled", __func__,
handle);
#endif

return (WAIT_OBJECT_0);
}

ok = _wapi_lookup_handle (handle, WAPI_HANDLE_PROCESS,
(gpointer *)&process_handle);
Expand Down Expand Up @@ -246,7 +261,6 @@ void _wapi_process_signal_self ()
process_set_termination_details (current_process, 0);
}
}


static void process_set_defaults (struct _WapiHandle_process *process_handle)
{
Expand Down

0 comments on commit 104931c

Please sign in to comment.