[PATCH] Already running a command

Pavel Tsekov ptsekov at gmx.net
Wed Nov 24 13:46:44 UTC 2004


Hello,

On Wed, 24 Nov 2004, Pavel Tsekov wrote:

> Hello,
>
> On Mon, 22 Nov 2004, Leonard den Ottolander wrote:
>
> > Hi,
> >
> > I wrote:
> > > I forgot to remove the comment about subshell state ACTIVE.
> >
> > These improvements make subshell_ready extern, so we can test if
> > (subshell_ready == TRUE) in shell_execute() instead of if
> > (subshell_state == INACTIVE) before calling do_execute(). We should
> > investigate if subshell_state is perhaps totally redundant.
>
> Now, you've really broke your own patch. I see that you haven't tested
> your code. By doing the changes above (using subshell_ready)
> you actually remove the effect of your changes to invoke_subshell().
> So you actully reintroduced the still get 'The shell is already
> running a command' message.
>
> Why ? Because `subshell_ready' is FALSE until the prompt is not
> reprinted by the shell i.e. a command was executed. It is set
> to TRUE after the prompt reappears.

The patch without the last changes doesn't make much sense too:

1) Ctrl + O

2) qwe

3) Ctrl + O

4) In the command prompt widget type some valid command
   say 'df' and type enter

5) Ctrl + O

You'll get:

[ptsekov at baba-meca build]$ qwedf
bash: qwedf: command not found



More information about the mc-devel mailing list