I can use pthread_create() to kick off 7 threads, each thread contains a fprintf(unique_fid) command
However I have noticed when running the 7 threads, the fprintf command seems to use all defined unique_fid's not just the sole one assigned to a thread, so the data gets shuffled when printing.
Why are running pthreads mixing up the file descriptors?