title: How to read the PID of the previous executed process in C?
body: <p>I would like to read the PID of the previous executed process in C.</p>
  <p>For example, I have process 1 which sleeps for 1s and when wakes up reads the PID of the process executing before the context switch. Process 1 runs with higher priority than the other processes so as when the sleep time finishes it immediately scheduled to run.</p>
  <p>How can I get the information on which process PID run before its execution was interrupted so as process 1 executes?</p>