Changeset 3475 for trunk/src/kash/eval.c


Ignore:
Timestamp:
Sep 16, 2020, 11:18:31 PM (5 years ago)
Author:
bird
Message:

kash: exec.c/h+eval.c: Fixed no-rehashing-needed optimizations so they work for windows and OS/2 as well (UNIX-specific abspath detection). Cache the suffix found by stat_pc_exec_exts so that we don't have to repeat it 2 microseconds after find_command called it. Use the specialized shfile_stat variants where possible. eval.c: Fixed double free of commandname in evalcommand_doit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/eval.c

    r3458 r3475  
    10121012                                        exitshell(psh, psh->exitstatus);
    10131013                        }
    1014                         if (savecmdnamemalloc)
     1014                        else if (savecmdnamemalloc)
    10151015                                sh_free(psh, savecmdname);
    10161016                        if (e != -1) {
     
    10411041                                setvareq(psh, sp->text, VEXPORT|VSTACK);
    10421042                        envp = environment(psh);
    1043                         shellexec(psh, args->argv, envp, args->path, args->cmdentry.u.index);
     1043                        shellexec(psh, args->argv, envp, args->path,
     1044                                  args->cmdentry.u.n.index, args->cmdentry.u.n.suffix);
    10441045                        break;
    10451046                }
     
    14211422                for (sp = psh->cmdenviron; sp; sp = sp->next)
    14221423                        setvareq(psh, sp->text, VEXPORT|VSTACK);
    1423                 shellexec(psh, argv + 1, environment(psh), pathval(psh), 0);
     1424                shellexec(psh, argv + 1, environment(psh), pathval(psh), 0, -1);
    14241425        }
    14251426        return 0;
Note: See TracChangeset for help on using the changeset viewer.