Home | History | Annotate | Download | only in tests
      1 #include <assert.h>
      2 #include <unistd.h>
      3 
      4 int main ( int argc, char** argv, char** envp )
      5 {
      6    char* null_filename = NULL;
      7    char *const argv_exe[] = {"true", NULL};
      8 
      9    execve(null_filename, NULL, NULL);
     10    // Solaris requires non-NULL argv param (this is not necessary on Linux)
     11    execve("../../tests/true", argv_exe, envp);
     12    assert(0);  // shouldn't get here
     13 }
     14