#include <stdlib.h>
#include <process.h>

/*
 * hmm... strange. execvp() doesn`t wait for bash to complete
 * if sh is run from bash, so I`ve used spawnvp(P_WAIT...).
 * Didn`t have time to find out what`s up.
 */

int main (int argc, char *argv[])
{
 int rc;

 argv[0] = "sh";
 rc = spawnvp(P_WAIT, "bash.exe", argv);
 if (rc >= 0)
  return (rc);	/* Exit code */
 else
  return 127;	/* ENOENT */
}
