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