1*4b169a6bSchristos /* Check corner error case: specifying invalid PID. 2*4b169a6bSchristos #progos: linux 3*4b169a6bSchristos */ 4*4b169a6bSchristos #include <string.h> 5*4b169a6bSchristos #include <sched.h> 6*4b169a6bSchristos #include <stdio.h> 7*4b169a6bSchristos #include <errno.h> 8*4b169a6bSchristos #include <stdlib.h> 9*4b169a6bSchristos main(void)10*4b169a6bSchristosint main (void) 11*4b169a6bSchristos { 12*4b169a6bSchristos struct sched_param sb; 13*4b169a6bSchristos memset (&sb, -1, sizeof sb); 14*4b169a6bSchristos if (sched_getparam (99, &sb) != -1 15*4b169a6bSchristos || errno != ESRCH) 16*4b169a6bSchristos abort (); 17*4b169a6bSchristos printf ("pass\n"); 18*4b169a6bSchristos exit (0); 19*4b169a6bSchristos } 20