[GRASS-dev] Open/close db drivers order

Radim Blazek radim.blazek at gmail.com
Wed Oct 21 01:16:29 PDT 2015


On Tue, Oct 20, 2015 at 7:18 PM, Radim Blazek <radim.blazek at gmail.com> wrote:
> I found, that db drivers must be closed in reverse order to the order
> in which were opened, otherwise it hangs (Linux). I vaguely remember
> that this was a problem years ago. Is it still an issue, anybody knows
> more about the problem?

I found a note in copy_tab.c: "Warning: driver opened as second must
be closed as first, otherwise it hangs, not sure why."

It is hanging in db_shutdown_driver on
  G_wait(driver->pid) == -1 ? -1 : 0;
both driver processes are still running. So fclose(driver->send) does
not close the pipe if another one was opened after?

Radim


More information about the grass-dev mailing list