comparison 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
comparison
equal deleted inserted replaced
3104:1b8b05f76ae9 3105:da324fe688b3
33 #include <sys/wait.h> 33 #include <sys/wait.h>
34 #include <ctype.h> 34 #include <ctype.h>
35 #include <math.h> 35 #include <math.h>
36 #include "gaim.h" 36 #include "gaim.h"
37 #include "prpl.h" 37 #include "prpl.h"
38 #include "gtkspell.h"
38 39
39 char *full_date() 40 char *full_date()
40 { 41 {
41 char *date; 42 char *date;
42 time_t tme; 43 time_t tme;
614 615
615 616
616 void clean_pid(void) 617 void clean_pid(void)
617 { 618 {
618 int status; 619 int status;
619 pid_t pid; 620 pid_t pid, spell_pid;
620 621
621 printf ("clean_pid\n"); 622 while((pid = waitpid(-1, &status, WNOHANG)) > 0) {
622 pid = waitpid(-1, &status, WNOHANG); 623 if((spell_pid = gtkspell_running()) != 0 && pid == spell_pid) {
624 gtkspell_notrunning();
625 }
626 }
627 if(pid < 0 && errno != ECHILD) {
628 char errmsg[BUFSIZ];
629 sprintf(errmsg, "Warning: waitpid() returned %d", pid);
630 perror(errmsg);
631 }
623 } 632 }
624 633
625 struct aim_user *find_user(const char *name, int protocol) 634 struct aim_user *find_user(const char *name, int protocol)
626 { 635 {
627 char *who = g_strdup(normalize(name)); 636 char *who = g_strdup(normalize(name));