Mercurial > pidgin.yaz
comparison pidgin/gtkmain.c @ 21446:7710a871fabf
Add a lengthy comment about a small problem with our signal handler
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 12 Nov 2007 08:10:24 +0000 |
parents | 3cc856ca2338 |
children | 47b2074a55d8 |
comparison
equal
deleted
inserted
replaced
21445:43c329bb5983 | 21446:7710a871fabf |
---|---|
193 signal(SIGALRM, sighandler); | 193 signal(SIGALRM, sighandler); |
194 } | 194 } |
195 | 195 |
196 char *segfault_message; | 196 char *segfault_message; |
197 | 197 |
198 /* | |
199 * This signal handler shouldn't be touching this much stuff. | |
200 * It should just set a flag and return, and something else in | |
201 * Pidgin should monitor the flag to see if something needs to | |
202 * be done. Because the signal handler interrupts the program, | |
203 * it could be called in the middle of adding a new connection | |
204 * to the list of connections, and then if we try to disconnect | |
205 * all connections it could lead to a crash because the linked | |
206 * list of connections could be in a weird state. But, well, | |
207 * this signal handler probably isn't called very often, so it's | |
208 * not a big deal. | |
209 */ | |
198 static void | 210 static void |
199 sighandler(int sig) | 211 sighandler(int sig) |
200 { | 212 { |
201 switch (sig) { | 213 switch (sig) { |
202 case SIGHUP: | 214 case SIGHUP: |