$OpenBSD: patch-pidgin_gtkmain_c,v 1.10 2009/12/07 06:27:59 steven Exp $
--- pidgin/gtkmain.c.orig	Sun Nov 29 22:13:55 2009
+++ pidgin/gtkmain.c	Sun Dec  6 13:05:10 2009
@@ -90,6 +90,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.
@@ -164,6 +165,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];
