Given a process ID, how can I tell if that process is currently blocked in a polling state? i.e. it has called poll() with a negative timeout, and is waiting for input to become ready.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On UNIX-like systems the command line utility ‘ps’ provides this information. There are many flavors of ps depending on the OS, so read the man page.
On a BSD-like system (mac):
where STAT is the process state. S means interruptible sleep. s (lower case) means session leader. ‘+’ means it’s in the foreground process group. R means running, or runnable (on run queue). There are many more possible states.