26 Dec
2009
26 Dec
'09
12:28 p.m.
pthread_create(&sqlthread, NULL, start_sql_server, (void *) server);
I would start by being more defensive. What is the return value of
pthread_create? did it work?
mapi_start_talking(mid);
This leads to a potential race condition, when this function is called there is no proof that the server thread has actually be started. This means that all kind of variables will not have been initialized and which easily generates a segfault.
return mid; }
Could someone give me hints as to what is going wrong here?