title: running mysql import from execv
body: <pre><code>pid_t childPid = fork ();
  if (childPid == (pid_t) 0)//zero success
  {
      const char *path = "/usr/local/mysql/bin/mysql";
      //doesn't work
      //char * const parmList[] = {"--user=root", "test_db", NULL};
      //does work
      char * const parmList[] = {"", "--user=root", "test_db", NULL};
      execv(path, parmList);
      printf("ERROR:\tFork failed.\n");   
  }
  else if (childPid &lt; (pid_t) 0)// -1 failure
  {
      /* The fork failed. */
      printf("ERROR:\tFork failed.\n");   
      return EXIT_FAILURE;
  }
  else
  {
      while (true) {
          //stay alive
          sleep(1);
      }
  }
  printf("done");
  exit(0);
  </code></pre>
  
  <p>I am having trouble importing a sql dump by using execv. You can see I wasn't able to login using the first paramList but the second one worked just fine. Anyways, if I add to the param list: </p>
  
  <pre><code>char * const parmList[] = {"", "--user=root", "test_db", "&lt;", "/Users/joelsaltzman/Desktop/dump.sql", NULL};
  </code></pre>
  
  <p>The output shows the mysql help for the command line args like I typed something wrong. 
  Does anybody know how to get this to work?</p>