[GRASS-dev] Open/close db drivers order

Radim Blazek radim.blazek at gmail.com
Wed Oct 21 13:01:52 PDT 2015


I have created https://trac.osgeo.org/grass/ticket/2775

It works if DB_PROC_SHUTDOWN_DRIVER is sent like on Windows. Patch
(very simple) is supplied.

Radim


On Wed, Oct 21, 2015 at 10:16 AM, Radim Blazek <radim.blazek at gmail.com> wrote:
> 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