How to program thread in Unix OS??
I use KDevelop(2.1) and write a very simple program below:
void *Dosomething(void* arg)
char* str = (char*)agr;
int main(int argc, char *argv)
char *agr = “Hello world”;
But when I debug the program, I have a serious error. I set a break point in a line 'pthread_create(...);' then start debugging. But the compiler notifies me with a message 'gdb message: Program received signal SIGSEGV,Segmentation fault '. The program is so simple that i can't understand the error. So i need some helps to solve this problem. I also need some documents to program with thread in Linux(Unix) environment.
Thanks very much for yours helps.