Mercurial > pidgin
comparison src/proxy.c @ 8798:28c0ebfd7a53
[gaim-migrate @ 9560]
i'm back, with half the horsepower, and even less overheating :-/
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sat, 24 Apr 2004 15:43:08 +0000 |
| parents | 58787b676854 |
| children | ae3f33870550 |
comparison
equal
deleted
inserted
replaced
| 8797:0f2af117d5d3 | 8798:28c0ebfd7a53 |
|---|---|
| 394 } | 394 } |
| 395 | 395 |
| 396 static void cope_with_gdb_brokenness() | 396 static void cope_with_gdb_brokenness() |
| 397 { | 397 { |
| 398 static gboolean already_done = FALSE; | 398 static gboolean already_done = FALSE; |
| 399 char s[300], e[300]; | 399 char s[256], e[512]; |
| 400 int n; | 400 int n; |
| 401 pid_t ppid; | 401 pid_t ppid; |
| 402 | 402 |
| 403 #ifdef __linux__ | 403 #ifdef __linux__ |
| 404 if(already_done) | 404 if(already_done) |
| 405 return; | 405 return; |
| 406 already_done = TRUE; | 406 already_done = TRUE; |
| 407 ppid = getppid(); | 407 ppid = getppid(); |
| 408 snprintf(s, 300, "/proc/%d/exe", ppid); | 408 snprintf(s, sizeof(s), "/proc/%d/exe", ppid); |
| 409 n = readlink(s, e, sizeof(e)); | 409 n = readlink(s, e, sizeof(e)); |
| 410 if(n < 0) | |
| 411 return; | |
| 412 | |
| 410 e[MIN(n,sizeof(e)-1)] = '\0'; | 413 e[MIN(n,sizeof(e)-1)] = '\0'; |
| 411 | 414 |
| 412 if(strstr(e,"gdb")) { | 415 if(strstr(e,"gdb")) { |
| 413 gaim_debug(GAIM_DEBUG_INFO, "dns", | 416 gaim_debug(GAIM_DEBUG_INFO, "dns", |
| 414 "Debugger detected, performing useless query...\n"); | 417 "Debugger detected, performing useless query...\n"); |
| 415 gethostbyname("x.x.x.x.x"); | 418 gethostbyname("x.x.x.x.x"); |
| 416 } | 419 } |
