Open sgenie68 opened 13 years ago
Can we just not support running gricli in the background for now (i.e. just document it somewhere that it doesn't work)? Or is it important enough usecase, given that we try to concentrate on stability issues atm and for the forseeable future?
I came across that as well now, with my test client. Must have to do something with jline or so... I'll move it out of this milestone though, not super-urgent...
Ok, had a look.
You can make it at least not crash by starting it like:
java -Djline.terminal=jline.UnsupportedTerminal -jar gricli-binary.jar &
can we somehow determine in the wrapper script whether the thing is run in the background? If so, we could just add the -Djline.terminal thing to the command if necessary.
It doesn't seem to redirect the output if you try that, though. So, that's probably not good enough, is it?
If a gricli is started in background:
cat kkk|griclish 2>res &
The following exception is generated and displayed:
java.lang.IllegalStateException: Shutdown in progress at java.lang.ApplicationShutdownHooks.add(ApplicationShutdownHooks.java:39) at java.lang.Runtime.addShutdownHook(Runtime.java:192) at jline.UnixTerminal.initializeTerminal(UnixTerminal.java:97) at jline.Terminal.setupTerminal(Terminal.java:75) at grisu.frontend.view.cli.CliHelpers.(CliHelpers.java:21)
at grisu.frontend.control.login.LoginManager.loginCommandline(LoginManager.java:591)
at grisu.gricli.command.InteractiveLoginCommand.execute(InteractiveLoginCommand.java:74)
at grisu.gricli.Gricli.login(Gricli.java:124)
at grisu.gricli.Gricli.main(Gricli.java:179)