Back to index

glibc  2.9
tst-execl1.c
Go to the documentation of this file.
00001 #include <errno.h>
00002 #include <stdio.h>
00003 #include <unistd.h>
00004 
00005 static int
00006 do_test (void)
00007 {
00008   static const char prog[] = "does-not-exist";
00009   errno = 0;
00010   execl (prog, prog, NULL);
00011 
00012   if (errno != ENOENT)
00013     {
00014       printf ("errno = %d (%m), expected ENOENT\n", errno);
00015       return 1;
00016     }
00017 
00018   return 0;
00019 }
00020 
00021 #define TEST_FUNCTION do_test ()
00022 #include "../test-skeleton.c"