octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unexpected prompt with "run-octave"


From: John W. Eaton
Subject: Unexpected prompt with "run-octave"
Date: Thu, 31 Oct 2013 02:55:02 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 10/30/2013 11:32 AM, Rik wrote:

I'm mostly seeing this, but with one more oddity.  If I type 'run-octave
--no-gui' the prompt at the CLI is "octave".  Similarly if I use
'run-octave --no-gui-libs' the prompt is "octave".  But, if I add an
additional option for processing, then the prompt changes to "octave-gui"
or "octave-cli".

If you install Octave and execute "octave --no-gui" or "octave
--no-gui-libs", the prompt should be set to "octave:#> " because we
unconditionally set argv[0] to "octave" and pass that to execv.  The
execv call execs either octave-gui or octave-cli and when you've
installed Octave, those are compiled programs and everything works as
expected.  At least, it seems to be working for me.

When you use the run-octave script, the "octave" driver program still
execs "octave-gui" or "octave-cli", but those programs are built with
libtool and so the files that are executed are shells scripts that set
up some things in the environment like LD_LIBRARY_PATH and then exec
the binaries.  We set argv[0] for the shell script, but the shell
script does not do the same when it execs the real program, so then
argv[0] that the real Octave sees is either octave-cli or octave-gui.

When you use run-octave with the --no-gui-libs option, you eventually
exec octave-cli, so the prompt should be octave-cli.  But when you use
--no-gui, you are still executing octave-gui, but you are passing the
--no-gui option.  So then you get the octave-gui prompt.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]