src/Pure/System/isabelle_system.scala
changeset 37132 10ef4da1c314
parent 37058 c47653f3ec14
child 37367 8680677265c9
equal deleted inserted replaced
37131:d4697a30bd02 37132:10ef4da1c314
   213             val pid =
   213             val pid =
   214               try { Some(Standard_System.read_file(pid_file)) }
   214               try { Some(Standard_System.read_file(pid_file)) }
   215               catch { case _: IOException => None }
   215               catch { case _: IOException => None }
   216             if (pid.isDefined) {
   216             if (pid.isDefined) {
   217               var running = true
   217               var running = true
   218               var count = 10
   218               var count = 10   // FIXME property!?
   219               while (running && count > 0) {
   219               while (running && count > 0) {
   220                 if (execute(true, "kill", "-INT", "-" + pid.get).waitFor != 0)
   220                 if (execute(true, "kill", "-INT", "-" + pid.get).waitFor != 0)
   221                   running = false
   221                   running = false
   222                 else {
   222                 else {
   223                   Thread.sleep(100)
   223                   Thread.sleep(100)   // FIXME property!?
   224                   if (!strict) count -= 1
   224                   if (!strict) count -= 1
   225                 }
   225                 }
   226               }
   226               }
   227             }
   227             }
   228           }
   228           }