aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
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)
[]