1#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. 11# if !defined(VGO_darwin) 12 if (execve("/bin/true", NULL, NULL) < 0) 13# else 14 if (execve("/usr/bin/true", NULL, NULL) < 0) 15# endif 16 { 17 perror("execve"); 18 exit(1); 19 } 20 } 21 22 exit(0); 23} 24