recovered basic session stop/restart;
authorwenzelm
Sat Sep 18 21:33:56 2010 +0200 (2010-09-18 ago)
changeset 3952459ebce09ce6e
parent 39523 d8971680b0fc
child 39525 72e949a0425b
recovered basic session stop/restart;
src/Pure/System/isabelle_process.scala
src/Pure/System/session.scala
     1.1 --- a/src/Pure/System/isabelle_process.scala	Sat Sep 18 21:10:07 2010 +0200
     1.2 +++ b/src/Pure/System/isabelle_process.scala	Sat Sep 18 21:33:56 2010 +0200
     1.3 @@ -163,7 +163,6 @@
     1.4            //{{{
     1.5            receive {
     1.6              case Input_Text(text) =>
     1.7 -              // FIXME echo input?!
     1.8                writer.write(text)
     1.9                writer.flush
    1.10              case Close =>
    1.11 @@ -365,5 +364,5 @@
    1.12    def input(name: String, args: String*): Unit =
    1.13      input_bytes(name, args.map(Standard_System.string_bytes): _*)
    1.14  
    1.15 -  def close(): Unit = command_input ! Close
    1.16 +  def close(): Unit = { standard_input ! Close; command_input ! Close }
    1.17  }
     2.1 --- a/src/Pure/System/session.scala	Sat Sep 18 21:10:07 2010 +0200
     2.2 +++ b/src/Pure/System/session.scala	Sat Sep 18 21:33:56 2010 +0200
     2.3 @@ -247,7 +247,7 @@
     2.4      }
     2.5  
     2.6  
     2.7 -    /* main loop */
     2.8 +    /* main loop */  // FIXME proper shutdown
     2.9  
    2.10      var finished = false
    2.11      while (!finished) {
    2.12 @@ -282,9 +282,9 @@
    2.13  
    2.14          case Stop => // FIXME synchronous!?
    2.15            if (prover != null) {
    2.16 +            global_state.change(_ => Document.State.init)
    2.17              prover.kill
    2.18              prover = null
    2.19 -            finished = true
    2.20            }
    2.21  
    2.22          case TIMEOUT =>  // FIXME clarify