mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Give the child process a real chance to die before we kill it.
Improve r15997 by processing all events without blocking, maybe until the child is dead. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16015 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1278,9 +1278,10 @@ gnc_detach_process (Process *proc, const gboolean kill_it)
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
if (kill_it) {
|
||||
if (kill_it && !proc->dead) {
|
||||
/* give it a chance to die */
|
||||
g_main_context_iteration (NULL, FALSE);
|
||||
while (g_main_context_iteration (NULL, FALSE) && !proc->dead)
|
||||
;
|
||||
if (!proc->dead)
|
||||
gnc_gpid_kill (proc->pid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user