$OpenBSD: patch-src_callbacks_c,v 1.2 2010/04/17 10:01:39 ajacoutot Exp $ --- src/callbacks.c.orig Tue Sep 22 15:30:34 2009 +++ src/callbacks.c Sat Apr 17 10:25:09 2010 @@ -284,12 +284,11 @@ gn_quit_app (GtkWidget * widget, gpointer data) { gint status, pid; - pid = getpid () + 1; - while (waitpid (-1, &status, WNOHANG) == 0) { - if (waitpid (pid, &status, WNOHANG) == 0) - kill (pid, SIGKILL); - pid ++; - } + pid = getpid (); + if (childpid > 0) + kill (childpid, SIGKILL); + if (waitpid (pid, &status, WNOHANG) == 0) + kill (pid, SIGKILL); netinfo_progress_indicator_stop (NULL);