Ignore:
Timestamp:
Sep 10, 2020, 4:08:18 PM (5 years ago)
Author:
bird
Message:

kash: when duplicateing a fdtab, don't heed close-on-exec on windows or in non-forked mode. Close files in sh_execve before waiting, but leave the tracefd open.

File:
1 edited

Legend:

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

    r3442 r3444  
    4444#include "error.h"
    4545#include "memalloc.h"
     46#include "redir.h"
    4647#include "shell.h"
    4748#include "trap.h"
     
    18411842                           &ProcInfo);
    18421843
    1843         shfile_exec_win(&psh->fdtab, 0 /* done */, NULL, NULL);
     1844        shfile_exec_win(&psh->fdtab, rc ? 0 /* done */ : -1 /* done but failed */, NULL, NULL);
    18441845#ifndef SH_FORKED_MODE
    18451846        shmtx_leave(&g_sh_exec_mtx, &tmp);
Note: See TracChangeset for help on using the changeset viewer.