1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD DETACH acting strangely

Discussion in 'Support' started by vefatica, Jul 11, 2014.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,971
    Likes Received:
    30
    If I
    Code:
    detach g:\tc16\tcc.exe
    I get a transient, truly detached (no conhost) instance of TCC. Is it supposed to be transient?
    If, expecting the same behavior, I
    Code:
    v:\> echo %comspec
    G:\TC16\TCC.EXE
    
    v:\> detach %comspec
    I get a non-transient detached TCC process **PLUS** a new non-transient, visible TCC process. Likewise detaching "%comspec /k" or "g:\tc16\tcc.exe /k".

    Is it working correctly (especially the extra, visible TCCs)?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    WAD.

    First, your detached command (tcc.exe by itself) is meaningless and will do nothing at all. It would be better if you had a real-world example here -- this is critical because the contents of your command line determines how DETACH behaves.

    If you are detaching an internal command, alias, or batch file, DETACH starts a transient copy of TCC to execute the command. If you are detaching an external command, DETACH runs the command directly.

    DETACH does not perform any variable expansion, so your "detach %comspec" is being executed as "tcc.exe /c %comspec", and your detached copy of TCC starts another (non-detached) copy of TCC.
     

Share This Page