accidental ampersand

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
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?
 
#3
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?
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?
 

rconn

Administrator
Staff member
May 14, 2008
10,176
86
#4
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?
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
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.)
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?