Changeset 1720 for trunk/dll/systemf.c


Ignore:
Timestamp:
Feb 16, 2014, 8:47:30 PM (11 years ago)
Author:
Gregg Young
Message:

Add "#" command line switch to workaround problem with blank command shell started from fm2 after fm2 has been started with stdout and stderr redirected to a file. Fixes it by using the system environment instead of fm2's when starting command shells.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/systemf.c

    r1673 r1720  
    3939  26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
    4040                xDosAlloc* wrappers.
     41  16 Feb 14 GKY Add "#" command line switch to workaround problem with blank command shell
     42                started from fm2 after fm2 has been started with stdout and stderr
     43                redirected to a file.
    4144
    4245***********************************************************************/
     
    11901193      }
    11911194      sdata.Environment = (PBYTE)pszEnvironment;
    1192       sdata.InheritOpt = SSF_INHERTOPT_PARENT;
     1195      if (fUseShellEnv && (!strcmp(GetCmdSpec(TRUE), pszPgm) ||
     1196          !strcmp(GetCmdSpec(FALSE), pszPgm)))
     1197        sdata.InheritOpt = SSF_INHERTOPT_SHELL;
     1198      else
     1199        sdata.InheritOpt = SSF_INHERTOPT_PARENT;
    11931200      sdata.SessionType = (USHORT) ulAppType;
    11941201      sdata.ObjectBuffer = szObject;
Note: See TracChangeset for help on using the changeset viewer.