Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception if running gricli in background #171

Open
sgenie68 opened this issue Sep 12, 2011 · 3 comments
Open

Exception if running gricli in background #171

sgenie68 opened this issue Sep 12, 2011 · 3 comments
Assignees

Comments

@sgenie68
Copy link

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)

@makkus
Copy link

makkus commented Sep 25, 2011

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?

@makkus
Copy link

makkus commented Oct 18, 2011

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...

@makkus
Copy link

makkus commented Oct 27, 2011

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?

@ghost ghost assigned sgenie68 Jan 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants