1*4b169a6bSchristos /* Check for proper pipe semantics at corner cases. 2*4b169a6bSchristos #progos: linux 3*4b169a6bSchristos */ 4*4b169a6bSchristos 5*4b169a6bSchristos #include <stdio.h> 6*4b169a6bSchristos #include <stdlib.h> 7*4b169a6bSchristos #include <unistd.h> 8*4b169a6bSchristos #include <errno.h> 9*4b169a6bSchristos main(void)10*4b169a6bSchristosint main (void) 11*4b169a6bSchristos { 12*4b169a6bSchristos if (pipe (NULL) != -1 13*4b169a6bSchristos || errno != EFAULT) 14*4b169a6bSchristos { 15*4b169a6bSchristos perror ("pipe"); 16*4b169a6bSchristos abort (); 17*4b169a6bSchristos } 18*4b169a6bSchristos 19*4b169a6bSchristos printf ("pass\n"); 20*4b169a6bSchristos exit (0); 21*4b169a6bSchristos } 22