blob: aba252967d4eac46ec9ac289f2c62fa0e00a1be6 [file] [log] [blame]
Jeff Browned07e002011-02-03 17:46:23 -08001#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4
5int main(int argc, char **argv)
6{
7 if (argc == 1)
8 {
9 // This tests the case where argv and envp are NULL, which is easy to
10 // get wrong because it's an unusual case.
Ben Cheng663860b2013-01-31 15:38:14 -080011 if (execve("/bin/true", NULL, NULL) < 0)
Jeff Browned07e002011-02-03 17:46:23 -080012 {
13 perror("execve");
14 exit(1);
15 }
16 }
17
18 exit(0);
19}