Linux sockets.. lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- ghamm · 2015-06-03 03:36 Hi, I have a weird problem. I need a socket guru to help.. I have a console app. In this app, I created a class to connect to a server, and send data back and forth.. I spawn a thread to do this. It works perfect.. In my main thread, Im trying open and read a file.. Like. I will use this info in a queue.. of sorts.. fileDesc := fpopen('/sys/bus/w1/devices/28-0000063db92b/w1_slave', O_RdOnly); Retval := fpread(fileDesc, TempStr[1], 1000); If retval > 0 then Begin   // do something with the read.. End;                              This code also works fine until I combine  it into my console app. The spawned thread does the normal socket stuff.. Waits for a readable socket with a timeout using "Select".. and reads and writes.. all in a SEPARATE thread. Like I said, works great , very stable..  For some strange reason, that "SELECT" function in my Socket thread messes up my FPRead in my MAIN thread.. Its almost like the select is acting system wide, and not thread specific. Please, any ideas?