Got it!
The CP 1 will never be reached because when calling pthread_create for the 1st time, you're not passing initUI to the function that will create the thread, you're CALLING it!!!
The right code would be like this:
pthread_create(&guithread, NULL, initUI, argv);
pthread_create(&guithread, NULL, initUI, argv);
To copy to clipboard, switch view to plain text mode
Passing initUI(argv) to pthread_create does not pass the pointer to the function initUI, but its resultant void* by effectively calling initUI(argv).
Best regards
Bookmarks