diff src/util.c @ 3806:b7a6aa99ee7c

[gaim-migrate @ 3949] Damned sound. Thanks, Rob McQueen. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 26 Oct 2002 19:16:26 +0000
parents 9bcb42faccc0
children 43e396e94095
line wrap: on
line diff
--- a/src/util.c	Sat Oct 26 18:12:17 2002 +0000
+++ b/src/util.c	Sat Oct 26 19:16:26 2002 +0000
@@ -642,6 +642,21 @@
 	return date;
 }
 
+void clean_pid(void)
+{
+#ifndef _WIN32
+	int status;
+	pid_t pid;
+
+	pid = waitpid(-1, &status, 0);
+	if(pid < 0 && errno != ECHILD) {
+		char errmsg[BUFSIZ];
+		sprintf(errmsg, "Warning: waitpid() returned %d", pid);
+		perror(errmsg);
+	}
+#endif
+}
+
 struct aim_user *find_user(const char *name, int protocol)
 {
 	char *who = g_strdup(normalize(name));