src/gtkmain.c

changeset 10333
2915deb8a5d9
parent 10332
62ed0121db22
child 10334
11feb68437a8
equal deleted inserted replaced
10332:62ed0121db22 10333:2915deb8a5d9
123 } 123 }
124 124
125 return ret; 125 return ret;
126 } 126 }
127 127
128 #if HAVE_SIGNAL_H
128 static void 129 static void
129 clean_pid(void) 130 clean_pid(void)
130 { 131 {
131 #ifndef _WIN32 132 #ifndef _WIN32
132 int status; 133 int status;
141 perror(errmsg); 142 perror(errmsg);
142 } 143 }
143 #endif 144 #endif
144 } 145 }
145 146
146 #if HAVE_SIGNAL_H
147 void 147 void
148 sighandler(int sig) 148 sighandler(int sig)
149 { 149 {
150 switch (sig) { 150 switch (sig) {
151 case SIGHUP: 151 case SIGHUP:
178 #endif 178 #endif
179 abort(); 179 abort();
180 break; 180 break;
181 case SIGCHLD: 181 case SIGCHLD:
182 clean_pid(); 182 clean_pid();
183 #if HAVE_SIGNAL_H
184 signal(SIGCHLD, sighandler); /* restore signal catching on this one! */ 183 signal(SIGCHLD, sighandler); /* restore signal catching on this one! */
185 #endif
186 break; 184 break;
187 default: 185 default:
188 gaim_debug_warning("sighandler", "Caught signal %d\n", sig); 186 gaim_debug_warning("sighandler", "Caught signal %d\n", sig);
189 gaim_connections_disconnect_all(); 187 gaim_connections_disconnect_all();
190 188

mercurial