-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
init: Start shell only with TTY #768
Conversation
|
This will needs to be rebased and merged after #722 is in. |
|
There is actually no need to wait for #722 with a review of this. (@hellik @nilason and others:) Test on Windows would be great (I'm actually not sure how what to test there, but perhaps just replacing grass.py from your installation would be enough). Test on macOS would be a nice bonus (it is expected to be the same as Linux). |
|
I wasn't able to reproduce the failure, so I cannot say if much about the fix per se. |
Thanks. That should be enough for macOS (I expect the same behavior as Linux). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I confirmed the startup issue without TTY in Linux, which this PR fixed.
Start the (sub-)shell only when running in an interactive terminal (TTY). Without checking this, the start fails in contexts when terminal is not available, for example, running command from Alt+F2 dialog on many Linux distributions. The same situation can be created using the nohup command. A failure to retrieve shell PID from gisenv is no longer considered an error for cases when shell was not started. The interactive shell can be forced regadless of the TTY by using --text in the command line.
Start the (sub-)shell only when running in an interactive terminal (TTY).
Without checking this, the start fails in contexts when terminal is not available,
for example, running command from Alt+F2 dialog on many Linux distributions.
The same situation can be created using the nohup command.
A failure to retrieve shell PID from gisenv is no longer considered an error
for cases when shell was not started.
The interactive shell can be forced regadless of the TTY by using --text in the command line.
This solves Trac ticket 3295 (GRASS GIS fails to start without terminal).