The semantics of fork () and pthread_create () are slightly different.
fork () will create a new process where global variables will be split between parent and child. Most OS implementations will use copy-on-write semantics, which means that both the parent and child processes will use the same pages of physical memory for all global variables until one of the processes tries to edit the physical memory, after which a copy of this page, so now each process gets its own copy and does not see another process, so the processes are isolated.
pthread_create (), on the other hand, creates a new thread within a single process. The new thread will have a separate stack space from other working threads of the same process, however global variables and empty space are shared between all threads of the same process. This is why you often need a mutex to coordinate access to a common piece of memory between multiple threads of the same process.
TL DR version: with fork () you do not see the changes of another guy; using pthread_create ().
source share