[GRASS-dev] db.connect exit codes

Radim Blazek radim.blazek at gmail.com
Mon May 8 04:38:57 EDT 2006


On 5/8/06, Hamish <hamish_nospam at yahoo.com> wrote:
> currently if no DB/driver is defined (new mapset), "db.connect -p" returns
> with an error code of 0.
>
> G61> db.connect -p
> driver:(null)
> database:(null)
> schema:(null)
> group:(null)
> G61> echo $?
> 0
>
>
> This makes it hard to test in a script... (v.db.addtable fails)
>
> I assume the (null) comes from printf("%s",..);
>
> Is there anything wrong with setting it to something >0 and ideas on how
> to do that?

But return code 0 is correct, it means that module successfully finished
and that is true. Module's return code cannot depend on defined driver.

Radim

>
> Hamish
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>




More information about the grass-dev mailing list