title: Are process ids non-negative in Linux?
body: <p>I am implementing a syscall that is called in user-space, lets say by foo.
  The syscall accesses foo's task_struct ( throught the global pointer current), prints it's name and pid, then goes on to foo's parent-process, foo's parent's parent etc. Prints all their names and pids up to and including the init process's.</p>
  
  <p>The pid=1 is reserved for init, the pid=0 is reserved for swapper.</p>
  
  <p>According to swapper's task_struct, it's parent process is itself.</p>
  
  <p>Swapper (or sched) always has pid=0 and is always init's parent-process?</p>
  
  <p>Are all pids non-negative? Is it ok for me to make that assumption?</p>