Mercurial > pidgin
diff src/main.c @ 7107:9220c7490cd1
[gaim-migrate @ 7672]
This is a big one: normalize() -> gaim_normalize, linkify_text() ->
gaim_markup_linkify(), gaim_get_size_string() -> gaim_str_size_to_units(),
and moved clean_pid() to main.c.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 01 Oct 2003 06:17:28 +0000 |
parents | c4faffdc0862 |
children | d17a587efeb3 |
line wrap: on
line diff
--- a/src/main.c Wed Oct 01 05:56:58 2003 +0000 +++ b/src/main.c Wed Oct 01 06:17:28 2003 +0000 @@ -354,6 +354,24 @@ } +static void +clean_pid(void) +{ +#ifndef _WIN32 + int status; + pid_t pid; + + do { + pid = waitpid(-1, &status, WNOHANG); + } while (pid != 0 && pid != (pid_t)-1); + if(pid == (pid_t)-1 && errno != ECHILD) { + char errmsg[BUFSIZ]; + snprintf(errmsg, BUFSIZ, "Warning: waitpid() returned %d", pid); + perror(errmsg); + } +#endif +} + #if HAVE_SIGNAL_H void sighandler(int sig) {