Ignore:
Timestamp:
Oct 23, 2014, 11:45:51 PM (11 years ago)
Author:
bird
Message:

Safer and more generic _path and _searchenv functions, making the spawn code use for locating executables in a more flexible manner. Unix style search PATH separators are now honored. Fixes #180 and #308.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/libc/emxload/emxloadp.c

    r3876 r3904  
    1010int _emxload_prog (const char *name, int seconds)
    1111{
    12   char buf1[MAXPATHLEN];
    1312  char buf2[MAXPATHLEN];
    1413
    1514  if (seconds != _EMXLOAD_INDEFINITE && seconds < 0)
    1615    return -1;
    17   _strncpy (buf1, name, sizeof (buf1));
    18   _defext (buf1, "exe");
    19   if (_path (buf2, buf1) != 0 || _abspath (buf2, buf2, sizeof (buf2)) != 0)
     16  if (   _path2 (name, ".exe", buf2, sizeof (buf2)) != 0
     17      || _abspath (buf2, buf2, sizeof (buf2)) != 0)
    2018    return -1;
    2119  return _emxload_request (_EMXLOAD_LOAD, buf2, seconds);
Note: See TracChangeset for help on using the changeset viewer.