Mercurial > pidgin
diff src/util.c @ 3105:da324fe688b3
[gaim-migrate @ 3119]
Jabber improvements (Jim Seymour) and good handling of sigchld (Jim Seymour and Luke Schierer)
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 28 Mar 2002 20:07:45 +0000 |
parents | a7e03c5d2205 |
children | 3805d9d344f2 |
line wrap: on
line diff
--- a/src/util.c Thu Mar 28 19:58:58 2002 +0000 +++ b/src/util.c Thu Mar 28 20:07:45 2002 +0000 @@ -35,6 +35,7 @@ #include <math.h> #include "gaim.h" #include "prpl.h" +#include "gtkspell.h" char *full_date() { @@ -616,10 +617,18 @@ void clean_pid(void) { int status; - pid_t pid; + pid_t pid, spell_pid; - printf ("clean_pid\n"); - pid = waitpid(-1, &status, WNOHANG); + while((pid = waitpid(-1, &status, WNOHANG)) > 0) { + if((spell_pid = gtkspell_running()) != 0 && pid == spell_pid) { + gtkspell_notrunning(); + } + } + if(pid < 0 && errno != ECHILD) { + char errmsg[BUFSIZ]; + sprintf(errmsg, "Warning: waitpid() returned %d", pid); + perror(errmsg); + } } struct aim_user *find_user(const char *name, int protocol)