[GRASS-user] catching bash shell signals via trap under g.parser

Hi,

I am (still) using grass6.1.cvs on cygwin.

While trying to code a cleanup routine to be performed in case of user
break in a bash/grass script, I found that Ctrl+C seems to be catched
only when I start the script via CLI and not when I use the grass
parser. Is this a cygwin-related behavior?

I am asking because I notice that there are a number of grass addon
scripts with parser interface that feature error catching via the trap
command, so I was guessing it was feasible to implement it myself.

Thanks in advance,

Luigi

Luigi Ponti wrote:

I am (still) using grass6.1.cvs on cygwin.

While trying to code a cleanup routine to be performed in case of user
break in a bash/grass script, I found that Ctrl+C seems to be catched
only when I start the script via CLI and not when I use the grass
parser. Is this a cygwin-related behavior?

Quite possibly; g.parser itself doesn't modify the signal handling in
any way.

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