I wrote a simple program in linux where it creates the socket id(got socket FD as 3), prints it and close it. Just before closing it will wait for user input. I started one more program instance in different shell. Second program also created socket but got same socket FD i.e., 3. Then i extended the program to create two sockets in the same program. Now i got socket FD as 3 and 4.
Now my doubt is whether Socket FD values are specific to a process? If so, how does select call will correctly identifies which socket got the data?