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

accidental ampersand

Discussion in 'T&T - Miscellaneous' started by Roedy, Dec 31, 2016.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    lets say I am trying to type: batch1.btm & batch2.btm
    but instead I accidentally type: batch1.btm &

    My computer goes berserk. opening and closing windows like mad. I can't stop it.

    1. Why is this happening?
    2. what is the best way to halt?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,311
    Likes Received:
    39
    Code:
    batch1.btm &
    is just a synonym for
    Code:
    detach batch1.btm
    DETACH should report the PID for the new process when it creates it; you can feed that PID to TASKEND to kill it.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    I suspect the windows are those of transient instances of TCC, probably from pipes, or of instances of external programs. "TASKEND /F %_DETACHPID" (or do it manually from TaskMgr) should get rid of most or all of things.

    But there's something I don't understand, namely piping in a detached instance. If I DETACH this BTM,
    Code:
    v:\> type abcd.btm
    echo foo | grep foo
    a console window for GREP.EXE opens and doesn't close. What's going on there?
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    GREP.EXE is an external app, and gets its own console window. There isn't any way to tell Windows that you want child pipe processes to be detached. (Nor can I imagine a situation where you would want to do this -- certainly nobody's brought it up in the last 15 years.)
     
  5. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    The window doesn't surprise me. It's the fact that it doesn't close. Does the detached TCC produce standard output that should go to GREP?
     

Share This Page