$OpenBSD: patch-pidgin_gtkmain_c,v 1.7 2008/06/05 10:24:15 ajacoutot Exp $
--- pidgin/gtkmain.c.orig	Tue May  6 08:04:02 2008
+++ pidgin/gtkmain.c	Mon May 19 00:40:56 2008
@@ -88,6 +88,7 @@ static SnDisplay *sn_display = NULL;
 #endif
 
 #ifdef HAVE_SIGNAL_H
+int real_status;
 
 /*
  * Lists of signals we wish to catch and those we wish to ignore.
@@ -158,6 +159,8 @@ clean_pid(void)
 	do {
 		pid = waitpid(-1, &status, WNOHANG);
 	} while (pid != 0 && pid != (pid_t)-1);
+
+	real_status = status;
 
 	if ((pid == (pid_t) - 1) && (errno != ECHILD)) {
 		char errmsg[BUFSIZ];
