Mercurial > pidgin
comparison src/gtkmain.c @ 10334:5aa8ed1ec91e
[gaim-migrate @ 11541]
"I love a circus."
--Guybrush Threepwood
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 09 Dec 2004 02:24:01 +0000 |
parents | 5eb81f349da7 |
children | 6a043ae92db6 |
comparison
equal
deleted
inserted
replaced
10333:5eb81f349da7 | 10334:5aa8ed1ec91e |
---|---|
127 | 127 |
128 #if HAVE_SIGNAL_H | 128 #if HAVE_SIGNAL_H |
129 static void | 129 static void |
130 clean_pid(void) | 130 clean_pid(void) |
131 { | 131 { |
132 #ifndef _WIN32 | |
133 int status; | 132 int status; |
134 pid_t pid; | 133 pid_t pid; |
135 | 134 |
136 do { | 135 do { |
137 pid = waitpid(-1, &status, WNOHANG); | 136 pid = waitpid(-1, &status, WNOHANG); |
138 } while (pid != 0 && pid != (pid_t)-1); | 137 } while (pid != 0 && pid != (pid_t)-1); |
139 if(pid == (pid_t)-1 && errno != ECHILD) { | 138 |
139 if ((pid == (pid_t) - 1) && (errno != ECHILD)) { | |
140 char errmsg[BUFSIZ]; | 140 char errmsg[BUFSIZ]; |
141 snprintf(errmsg, BUFSIZ, "Warning: waitpid() returned %d", pid); | 141 snprintf(errmsg, BUFSIZ, "Warning: waitpid() returned %d", pid); |
142 perror(errmsg); | 142 perror(errmsg); |
143 } | 143 } |
144 #endif | |
145 } | 144 } |
146 | 145 |
147 void | 146 void |
148 sighandler(int sig) | 147 sighandler(int sig) |
149 { | 148 { |
447 #endif | 446 #endif |
448 int opt; | 447 int opt; |
449 gboolean gui_check; | 448 gboolean gui_check; |
450 gboolean debug_enabled; | 449 gboolean debug_enabled; |
451 gchar *gaimrc, *accountsxml; | 450 gchar *gaimrc, *accountsxml; |
451 #if HAVE_SIGNAL_H | |
452 char errmsg[BUFSIZ]; | 452 char errmsg[BUFSIZ]; |
453 #endif | |
453 | 454 |
454 struct option long_options[] = { | 455 struct option long_options[] = { |
455 {"acct", no_argument, NULL, 'a'}, | 456 {"acct", no_argument, NULL, 'a'}, |
456 {"config", required_argument, NULL, 'c'}, | 457 {"config", required_argument, NULL, 'c'}, |
457 {"debug", no_argument, NULL, 'd'}, | 458 {"debug", no_argument, NULL, 'd'}, |