Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed TakeCommand kills processes when closed

Apr
36
0
Hello,

I am sorry to report a serious bug in TakeCommand 36 (all builds 27-30).

When TakleCommand is closed, it terminates (kills) all processes started from a TCC tab (ConPTY). This includes:
  • all tabbed consoles (to be expected)
  • all detached consoles (somewhat surprising)
  • ShrAlias (unexpected)
  • all windowed processes started from a TCC tab (unacceptable)
#4 has been tested and verified using TCEdit, Notepad++ and even WinWord. It is obvious that TakeCommand kills these processes, since they are closed without giving the user a chance to save any pending changes (aka unsaved data). This spells disaster!

The same is true for #3 since ShrAlias gets closed and does not save the current state of the histories. It is not a bug in ShrAlias, because it saves its data when unloaded using ShrAlias /U.

The above has been tested in a pristine state, that is, no aliases, no TCMD.INI, no TCSTART and even no TCEXIT. TakeCommand is installed in the default folder:

C:\Program Files\JPSoft\TCMD36

The data (INI-files and the like) is also at the default position:

C:\ProgramData\JP Software

The OS is current (German version), that is,

Windows 11, Version 25H2, Build 26200.8246

Hope this helps (and gets corrected soon)

Dieter Kössl
 
Fixed in build 31 (already uploaded).

Not sure what you mean about "all detached consoles", because you cannot detach a ConPTY session (Windows limitation, not TCMD). You can undock / tear off a ConPTY tab window - is that what you're referring to? ConPTY sessions cannot outlive their terminal host (TCMD in this case), because there would be nothing to handle their I/O.
 
You can undock / tear off a ConPTY tab window - is that what you're referring to?

Yes! Sorry, but my wording was inaccurate.

I gather that undocked consoles must be closed when TCMD closes. I was just surprised when that first happened. At first glance this doesn't seem to be much of an obstacle. On the other hand, I have a simple alias

ADM=start /elevated "%ComSpec%"

for doing "relevant stuff". This console still gets closed in build 31 when TCMD is closed. Is it possible to keep elevated copies of TCC "alive" when TCMD closes? This would be quite useful, at least for me, since I usually close everything which isn't needed when running elevated consoles. Keeps the mind focused.
 
ADM=start /elevated "%ComSpec%"

On a tangent, it might be useful for v37 to add /CONSOLE and /CONPTY options to the START command. (Would probably require something hackish, like starting CONHOST.EXE or OPENCONSOLE.EXE and passing it the appropriate command line?)
 
Back
Top