I followed robin's advice, running the script in the Perl debugger. Naturally that caused the script to run flawlessly; it was running for more than a day before I finally stopped it. I switched back to running it under control of the C program:
Unlike before, though, it's never getting the SIGSEGV it was getting earlier, so it never needs to be restarted. Meanwhile, it's happily servicing remote messages without any problems, both when run in debug mode, and now again from the C wrapper. I never did need to apply the patch which zentara referenced.#include <stdio.h> int main() { int result, sigval, b_core, exitval; char *red = "\033[101m"; char *cyan = "\033[106m"; char *off = "\033[m"; while (1) { result = system("perl ./done_server direct"); sigval = result & 0x7f; b_core = result & 0x80; exitval = (result >> 8) & 0xff; if (2 == sigval) { // User typed ^C printf("\n%s** Break **%s\n", cyan, off); exit(1); } printf("\n%sERROR -- The done_server exited%s\n", red, off); printf("%sResult = %d [%08lx]%s\n", red, result, result, of +f); printf("%sCoredump = %d%s\n", red, b_core, off); printf("%sExit val = %d%s\n", red, exitval, off); printf("Respawning ...\n"); } } /******************* *** End of main *** *******************/
Given the choice of knowing where a bug is but not being able to fix it, versus having a bug disappear and not knowing why, certainly the latter is preferrable. But it's perplexing!
In reply to Re: Any Known Problems with IO::Socket and/or IO::Select?
by liverpole
in thread Any Known Problems with IO::Socket and/or IO::Select?
by liverpole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |