J
JLeidel
All, I've been having an interesting issue in getting some `time`
functions to work within a threaded application. Essentially, all I'm
doing is retieving the local time from the main thread in order to
compare against a time offset of GMT.
So...
....
time_t cur_time = 0;
struct tm *my_time;
int rtn = 0;
time( &cur_time );
localtime_r( &cur_time, my_time );
....
segfaults on the `localtime_r` call.
compiled on suse linux using gcc 4.1.0; glibc 2.4-31.1
thread model is pthreads.
any thoughts??
cheers
john
functions to work within a threaded application. Essentially, all I'm
doing is retieving the local time from the main thread in order to
compare against a time offset of GMT.
So...
....
time_t cur_time = 0;
struct tm *my_time;
int rtn = 0;
time( &cur_time );
localtime_r( &cur_time, my_time );
....
segfaults on the `localtime_r` call.
compiled on suse linux using gcc 4.1.0; glibc 2.4-31.1
thread model is pthreads.
any thoughts??
cheers
john