Ctrl-C from within a library function

Dec 2, 2008
224
2
Canada
When I do a Ctrl-C while executing within a function from a library, current TCC seems to hang on the "Cancel batch job BatchName ? (Y/N/A) : y".

I put a PAUSE in the function and Ctrl-C on the PAUSE and it hangs.

Craig
 
Dec 2, 2008
224
2
Canada
I put a "ON BREAK EXIT" and it did exit.

Without the ON BREAK, Ctrl-C takes me to "Cancel batch job BatchName ? (Y/N/A) : y" and it freezes, the only thing I can do is to kill the current TCC process.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
I did a little testing. It seems to depend on what the library routine is doing. "Cancel batch job ..." works fine it the library routine is doing internal stuff. It also works fine if the library routine is doing

Code:
2>nul %@execarray[a,schtasks /query /V]

But if the library routine is doing this

Code:
iff %@execarray[s,cscript //nologo //job:SVJOB "d:\data\tcclibrary\sv.btm?.wsf"] != 0 then
        echo cscript error
        goto done
endiff

TCC will disappear every time when Ctrl-C is pressed (and will occasionally be restarted by Windows).

Cgunhouse ... I'm curious ... what's the library routine doing?
 
Dec 2, 2008
224
2
Canada
The routine is going through directories using a "for /r"

I have a Cloud Sync directory that I copy files to, but rather than put the files in the directory I am putting a hard link to save on disk space. Before a file is copied (or a link is created) it test to see if the file is already a link to that file. If it is it moves on to the next file. If it isn't the file is deleted from the Sync Directory and a new link is created.

I'm actually having a hard time getting it to work, the Ctrl-C issue did help. Any ideas would be helpful.

Cap "Y" does seem to work, but I would have thought lowercase "y" would too.
 
Similar threads
Thread starter Title Forum Replies Date
R Emacs-style cmdline editing Ctrl-K Support 0
vefatica Can I alias @@Ctrl-Shift-Alt-u? Support 4
Alpengreis Fixed [v26.00.26] Crash after answering INKEY with <Ctrl>+C Support 1
vefatica Ctrl-F? Support 3
MickeyF expand alias in cmdline with Ctrl-F in TCC Support 21
MickeyF Ctrl-S and Ctrl-Q in TCC Support 6
Peter Murschall IDE: Ctrl-W is a Harakiri Command ! Support 23
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
samintz TCEDIT Ctrl-S Support 2
vefatica Ctrl-Alt-L (R, Left, Right). Support 8
M Ctrl-C when using command line history does nothing Support 2
V Ctrl-Home/End don't work in Win10 Support 3
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
vefatica TPIPE.EXE crashes on Ctrl-C Support 9
Peter Murschall IDE destroys Text on Ctrl-U/Ctrl-Shift-U Support 12
vefatica Ctrl-Enter in command history window? Support 8
vefatica TPIPE crashes on Ctrl-C Support 1
cgunhouse Ctrl + Shift keys and Paste (drop down menu and V) Support 4
M View doesn't recognize Ctrl+End and Ctrl+Pos1 Support 2
M Ctrl-End doesn't work. DelToEnd is not executed Support 13
C Output continues after Ctrl-Break Support 8
J How to? Debug Keyboard Shortcuts (Ctrl-A not remapping?) Support 8
Jay Sage Ctrl-C Not Working Reliably to Copy Screen Content Support 4
vefatica Ctrl-x? Support 13
C How to? ctrl-c does not prompt "Terminate batch job" Support 2
vefatica Ctrl-T and Ctrl-Shift-T Support 6
P Disable global hotkey Ctrl+Shift+T Support 19
vefatica DATEMONITOR + Ctrl-C crashes TCCv15 Support 5
dcantor Fixed Ctrl+Shift+Insert repeats last character Support 3
A WAD No newlines in copy with Ctrl-Ins Support 2
A Ctrl-1 and the command history Support 5
vefatica Ctrl-Up/Down? Support 21
E Ctrl-V does not always work in BDEBUGGER Support 4
vefatica Should Ctrl-C interrupt a COPY? Support 2
M Ctrl-C and Java Support 19
K Ctrl-D alias no longer works Support 4
vefatica Ctrl-F1? Support 0
J CTRL-C does not work on Windows 7 64-bit Support 3
dcantor Does variable expansion (ctrl-x) actually work? Support 27
E Ctrl+C not working as expected Support 8
Juanma Barranquero Ctrl-C trouble Support 1
Fross CTRL-C in V10 Support 3
S Ctrl-C handling while piping Support 0
vefatica .PL and Ctrl-C Support 3
vefatica LIST, Ctrl-C leaves visual artifact Support 0
V Set path permanently from within TCC? Support 3
D What is the limit on the compound statement length within ( ) of a FOR-loop? Support 5
Alpengreis How to? Copy & Paste without linebreak within TCMD Support 13
T 64 bit TCCLE appears to crash when opening tcc.exe from within tcc.exe window Support 7
D Internal variable _tctabs within TCExit Support 9

Similar threads