Fix lldb backtrace on osx. When lldb attaching to the process it triggers few…
Fix lldb backtrace on osx. When lldb attaching to the process it triggers few "-1" errors on read with EINTR error. After 1-2 errors read() works again. Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated now and does not work.