title: after an error terminal console is blocked
body: <p>I have a minecraft server and I have a written script to restart the server that works after the &quot;stop&quot; command (after this command the server starts up again).</p>
  <pre><code>#!/bin/sh
  set -e
  
  if [ ! -s Launcher.jar ]
  then
      echo &quot;Replace Launcher.jar before starting&quot;
      exit
  fi
  
  while true
  do
  java -Xms1G -Xmx3G -Dlauncher.noJAnsi=false -cp Launcher.jar:Spigot.jar org.bukkit.craftbukkit.Main
  sleep 5
  done
  </code></pre>
  <p>but if an error occurs and the server stops due to this error, then my console is blocked and I cannot enter anything in it (which is why the script does not work). how can I solve this problem? What should I do to prevent the console from being blocked?</p>