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

start /wait not working correctly #420

Closed
jnersasi opened this Issue Nov 11, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@jnersasi

using start /wait to create a new console is not working correctly within conemu. The /wait switch should cause the shell to be blocked until the spawned shell is terminated but instead control is returned immediately. This differs from the behavior of the regular cmd shell.

to reproduce, simply start conemu and run:

start /wait

this will open a new tab, but control will return to the original shell immediately. This is a problem, as I have code that relies on the command line being blocked to function properly.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Nov 11, 2015

Owner

There is absolutely no way to determine if switch /wait was specified. The start even is not an executable! It's an internal instruction of cmd.exe.

The only way - disabling 'start' interception. Hm, another workaround - start /wait /min.

Owner

Maximus5 commented Nov 11, 2015

There is absolutely no way to determine if switch /wait was specified. The start even is not an executable! It's an internal instruction of cmd.exe.

The only way - disabling 'start' interception. Hm, another workaround - start /wait /min.

@jnersasi

This comment has been minimized.

Show comment
Hide comment
@jnersasi

jnersasi Nov 11, 2015

Thanks! Disabling the start interception worked like a charm. Ends up in
a regular old cmd window, but at least I can still use ConEmu!

Thanks for the great cmd replacement!

On Wed, Nov 11, 2015 at 4:56 PM, Maximus5 notifications@github.com wrote:

There is absolutely no way to determine if switch /wait was specified.
The start even is not an executable! It's an internal instruction of
cmd.exe.

The only way - disabling 'start' interception
https://conemu.github.io/en/SettingsFeatures.html#id2740. Hm, another
workaround - start /wait /min.


Reply to this email directly or view it on GitHub
#420 (comment).

Thanks! Disabling the start interception worked like a charm. Ends up in
a regular old cmd window, but at least I can still use ConEmu!

Thanks for the great cmd replacement!

On Wed, Nov 11, 2015 at 4:56 PM, Maximus5 notifications@github.com wrote:

There is absolutely no way to determine if switch /wait was specified.
The start even is not an executable! It's an internal instruction of
cmd.exe.

The only way - disabling 'start' interception
https://conemu.github.io/en/SettingsFeatures.html#id2740. Hm, another
workaround - start /wait /min.


Reply to this email directly or view it on GitHub
#420 (comment).

@jnersasi

This comment has been minimized.

Show comment
Hide comment
@jnersasi

jnersasi Nov 11, 2015

Out of curiosity, why did adding the /min switch cause the /wait to be honored?

Out of curiosity, why did adding the /min switch cause the /wait to be honored?

@Maximus5 Maximus5 closed this Nov 11, 2015

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Nov 11, 2015

Owner

cmd utilizes CreateProcess function, and there is no "Wait" flags. But there is wShowWindow and when ConEmu see SW_MINIMIZE it does not intercept start processing.

Otherwise, start ... is processed like -new_console switch.

Owner

Maximus5 commented Nov 11, 2015

cmd utilizes CreateProcess function, and there is no "Wait" flags. But there is wShowWindow and when ConEmu see SW_MINIMIZE it does not intercept start processing.

Otherwise, start ... is processed like -new_console switch.

@epsitec

This comment has been minimized.

Show comment
Hide comment
@epsitec

epsitec Mar 3, 2016

Just blogged about this issue on my blog. It took me a while to find why start /wait was not working.

My two cents: having 'start' interception turned on as a default is dangerous, since it breaks compatibility with existing scripts.

epsitec commented Mar 3, 2016

Just blogged about this issue on my blog. It took me a while to find why start /wait was not working.

My two cents: having 'start' interception turned on as a default is dangerous, since it breaks compatibility with existing scripts.

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