On Thu, Apr 05, 2007 at 12:00:01AM +0100, Stephen Gran wrote: > This one time, at band camp, Sven Luther said: > > And indeed, like i said, it worked fine 100s of times, and then died. Try : > > > > int main (void) { > > struct tm tm; > > time_t t; > > while (1) { > > t = time(NULL); > > localtime_r (&t, &tm); > > } > > exit(0); > > } > > [EMAIL PROTECTED]:~$ cat t.c > #include <time.h> > #include <stdlib.h> > > int main (void) { > struct tm tm; > time_t t; > while (1) { > t = time(NULL); > localtime_r (&t, &tm); > } > exit(0); > } > > [EMAIL PROTECTED]:~$ gcc -Wall t.c > [EMAIL PROTECTED]:~$ time LC_ALL=fr_FR.utf8 ./a.out > real 1m21.381s > user 1m1.716s > sys 0m18.985s > > No crash. This is x86, but ppc is the same.
As said, i see this on both an x86 box and my powerbook, but the complete code is more involved, having a pselect, as well as a SIGALRM handler, which both trigger the localtime_r, as well as a postgresql access and files access. I will try to provide a minimal program which exhibits the problem, but i needed a quick solution today, since the work goes into pre-production testing today. Friendly, Sven Luther -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]