aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-09-30 04:40:18 +0000
committerdos-reis <gdr@axiomatics.org>2009-09-30 04:40:18 +0000
commit505e209e5bc209a9ee7518da0f70124d25572789 (patch)
treef5cd9c203ba8a5a865f66afadd204a94f0d09474 /src/interp
parent808c5e28c0e8bc7a397eb2ffd1e77ee7a53061a6 (diff)
downloadopen-axiom-505e209e5bc209a9ee7518da0f70124d25572789.tar.gz
* sman/sman.c (fix_env): Simplify.
(exec_command_env): Lose second parameter. (fork_Axiom): Take a new parameter. (start_the_Axiom): Adjust. (main): Likewise. * interp/int-top.boot (printFirstPrompt?): New. (SpadInterpretStream): Use it. * driver/utils.h (openaxiom_allocate_command_argv): Declare. * driver/utils.c (openaxiom_allocate_command_argv): Define. * driver/Makefile.in (open-axiom$(EXEEXT)): Link statically.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/int-top.boot16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index 2ac19f7e..ca52a829 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -111,6 +111,16 @@ intloop () ==
resetStackLimits()
mode := CATCH($intTopLevel, SpadInterpretStream(1, nil, true))
+++ If the interpreter is spwan by the session manager, then
+++ each successful connection also creates its own frame.
+++ In particular, the only time we get to do anything in the `initial'
+++ frame is when we get the first connection. In that case, we would
+++ be asked by the session manager to create a frame. The client is
+++ not aware of that, It is therefore confusing to display a prompt,
+++ because all this horse-threading happens behind the client's back.
+printFirstPrompt?() ==
+ $interpreterFrameName ~= "initial" or
+ getOptionValue '"role" ~= '"server"
SpadInterpretStream(str, source, interactive?) ==
pile? := not interactive?
@@ -132,9 +142,9 @@ SpadInterpretStream(str, source, interactive?) ==
$promptMsg : local := 'S2CTP023
interactive? =>
- not $leanMode and printPrompt()
- intloopReadConsole('"", str)
- []
+ not $leanMode and printFirstPrompt?() and printPrompt()
+ intloopReadConsole('"", str)
+ []
intloopInclude (source,0)
[]