All pastes #743025 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-20 00:42 UTC
rendered paste body
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
  pid_t my_pid = getpid();
  printf("getpslot for pid %d is %d\n", my_pid, getpslot(my_pid));
  if(getpslot(-10) == -1)
  {
    perror("A pid can't be negative");
  }
  if(getpslot(200) == -1)
  {
    perror("Couldn't find pid inside table");
  }
}