[GRASS-dev] $GISBASE/etc/run what does this do?

Glynn Clements glynn at gclements.plus.com
Sun Jun 11 18:33:18 EDT 2006


David Finlayson wrote:

> Last night I got GRASS to launch and run entirely from Python. No
> bourne shell at all. I'm not sure what to do with the signal catching
> in the Init.sh script. I was going to look them up on Google and see
> what they do. Then decide whether this is a feature that should be
> duplicated in Python
> 
> Does it control how canceling commands (Ctrl+D, etc.) work?

If you don't run $SHELL via etc/run, the spawned shell will have
SIGINT and SIGQUIT disabled. In practice, this will typically disable
Ctrl-C and Ctrl-\ (the codes which generate the signals can be
changed, but those are the usual defaults).

AFAICT, the reason that Init.sh disables those signals is so that
Ctrl-C and Ctrl-\ go to the interactive session shell, not the shell
running the Init.sh script.

On a system which supports job control (which is likely to be every
Unix system still in use), that shouldn't be necessary, as the signals
will go to the foreground process group, which will be either the
spawned shell or its children.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list