- pthread_t th;
- int err = pthread_create(&th, NULL, stdin_reader_thread, NULL);
-
- if(err) {
- fprintf(stderr, "Could not start reader thread: %s\n", strerror(err));
+ if(!CreateThread(NULL, 0, stdin_reader_thread, NULL, 0, NULL)) {
+ fprintf(stderr, "Could not start reader thread: %d\n", GetLastError());