ephemerr
ephemerr

Reputation: 1983

How to get PID of QThread in Linux?

I need to get PID of specific QThread in linux. getpid returns pid of parent process. getCurrentThreadId returns Qt inner code. Is there any other way?

Upvotes: 1

Views: 1288

Answers (1)

ephemerr
ephemerr

Reputation: 1983

Found the answer there: https://stackoverflow.com/a/21280941/2656799

It is in use of syscall(SYS_gettid)

Upvotes: 1

Related Questions