New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer update kills ConEmu session #156

Open
pyhedgehog opened this Issue May 15, 2015 · 14 comments

Comments

Projects
None yet
3 participants
@pyhedgehog

pyhedgehog commented May 15, 2015

Reproduce

  • Start ConEmu
  • Start standard task "Scripts::Chocolatey"
  • type "cup -y conemu"

Actual results

Once installer starts it forcibly closes conemu with all tabs including chocolatey console.
You can't see installer results (especially if you've run update for several packages).

Wanted results

Variant 1

  • ConEmu detaches connected consoles
  • Installer upgrades conemu
  • Installer starts conemu
  • (optional) conemu re-attaches consoles

Variant 2

  • ConEmu session left intact
  • Installer uses MoveFileEx to register file update on reboot
@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog May 15, 2015

For me personally adding option "Detach consoles on closing" would be enough.

pyhedgehog commented May 15, 2015

For me personally adding option "Detach consoles on closing" would be enough.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 15, 2015

Owner

It is practically impossible to update ConEmu binaries within ConEmu session. Even detaching consoles will not behave properly because of http://conemu.github.io/en/ConEmuHk.html

ConEmu has its own auto update procedure which consider all issues.

But with chocolatey... Hmm. I'm not sure if it's possible at the moment. Update must be started outside of ConEmu window somehow.
http://conemu.github.io/en/DefaultTerminal.html
http://conemu.github.io/en/NewConsole.html

Owner

Maximus5 commented May 15, 2015

It is practically impossible to update ConEmu binaries within ConEmu session. Even detaching consoles will not behave properly because of http://conemu.github.io/en/ConEmuHk.html

ConEmu has its own auto update procedure which consider all issues.

But with chocolatey... Hmm. I'm not sure if it's possible at the moment. Update must be started outside of ConEmu window somehow.
http://conemu.github.io/en/DefaultTerminal.html
http://conemu.github.io/en/NewConsole.html

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog May 16, 2015

I've not found in you url why "detach on conemu window close" is impossible (however every tab in conemu has detach option right now), but I trust your experience in this topic.
What about using pending moves in installer?

pyhedgehog commented May 16, 2015

I've not found in you url why "detach on conemu window close" is impossible (however every tab in conemu has detach option right now), but I trust your experience in this topic.
What about using pending moves in installer?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 16, 2015

Owner

Detach is possible but several dll-s will remain loaded in started processes.

Owner

Maximus5 commented May 16, 2015

Detach is possible but several dll-s will remain loaded in started processes.

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog May 18, 2015

Why stopping injected threads and FreeLibrary can't help?
Once again - what about using pending moves in installer?

pyhedgehog commented May 18, 2015

Why stopping injected threads and FreeLibrary can't help?
Once again - what about using pending moves in installer?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 18, 2015

Owner

FreeLibrary may kill process in some cases.

Pending moves will work only on reboot. That is unwanted behavior I believe.

Anyway, the issue is complicated and requires some investigations...

Owner

Maximus5 commented May 18, 2015

FreeLibrary may kill process in some cases.

Pending moves will work only on reboot. That is unwanted behavior I believe.

Anyway, the issue is complicated and requires some investigations...

@pyhedgehog

This comment has been minimized.

Show comment
Hide comment
@pyhedgehog

pyhedgehog May 25, 2015

Why you think that it's unwanted behavior? It's standard behavior for system-wide updates. Console window is definitely system object. Isn't it?

pyhedgehog commented May 25, 2015

Why you think that it's unwanted behavior? It's standard behavior for system-wide updates. Console window is definitely system object. Isn't it?

Maximus5 added a commit that referenced this issue May 9, 2017

@jeffjensen

This comment has been minimized.

Show comment
Hide comment
@jeffjensen

jeffjensen Sep 11, 2017

I've used Chocolately and ConEmu for quite awhile and this problem recently happened to me because I recently made ConEmu the default term per https://conemu.github.io/en/DefaultTerminal.html

Is there a switch or something to launch an admin console using cmd -new_console:z ?

jeffjensen commented Sep 11, 2017

I've used Chocolately and ConEmu for quite awhile and this problem recently happened to me because I recently made ConEmu the default term per https://conemu.github.io/en/DefaultTerminal.html

Is there a switch or something to launch an admin console using cmd -new_console:z ?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Sep 12, 2017

Owner

Only the one session may survive after choco update. Regardless of that, you should restart the console manually after update.
That is due to protocol changes between versions and other issues.
Choco update script warns user about that.

Owner

Maximus5 commented Sep 12, 2017

Only the one session may survive after choco update. Regardless of that, you should restart the console manually after update.
That is due to protocol changes between versions and other issues.
Choco update script warns user about that.

@jeffjensen

This comment has been minimized.

Show comment
Hide comment
@jeffjensen

jeffjensen Sep 12, 2017

Yes, I would restart ConEmu / any console after the Choco update. However, that is not the issue I'm asking about because ConEmu crashes with the Choco update.

To prevent ConEmu crashing during update with Choco, I want to run Choco in an admin term that is not ConEmu. Since ConEmu is now the default term, how do I start the admin term?

jeffjensen commented Sep 12, 2017

Yes, I would restart ConEmu / any console after the Choco update. However, that is not the issue I'm asking about because ConEmu crashes with the Choco update.

To prevent ConEmu crashing during update with Choco, I want to run Choco in an admin term that is not ConEmu. Since ConEmu is now the default term, how do I start the admin term?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Sep 12, 2017

Owner

In my tests ConEmu didn't crash on update from choco tab, started in ConEmu of course.

Owner

Maximus5 commented Sep 12, 2017

In my tests ConEmu didn't crash on update from choco tab, started in ConEmu of course.

@jeffjensen

This comment has been minimized.

Show comment
Hide comment
@jeffjensen

jeffjensen Sep 13, 2017

I have 5 ConEmu .dmp files from it; it kept seg faulting so I killed it after the 5th. Do you want the first one or any of them?

jeffjensen commented Sep 13, 2017

I have 5 ConEmu .dmp files from it; it kept seg faulting so I killed it after the 5th. Do you want the first one or any of them?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Sep 13, 2017

Owner

First dump.

Owner

Maximus5 commented Sep 13, 2017

First dump.

@jeffjensen

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment