Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <process.h>
  4. #include <errno.h>
  5. #include <libc/unconst.h>
  6. #include <libc/dosexec.h>
  7.  
  8. int spawnvpe(int mode, const char *path, char *const argv[], char *const envp[])
  9. {
  10.   char rpath[300];
  11.   union { char * const *cpcp; char **cpp; } u;
  12.   u.cpcp = envp;
  13.  
  14.   if (!__dosexec_find_on_path(path, u.cpp, rpath))
  15.   {
  16.     errno = ENOENT;
  17.     return -1;
  18.   }
  19.   else
  20.     return spawnve(mode, rpath, argv, envp);
  21. }
  22.