PQfinish kills my app

From: Rob Brown-Bayliss <rob(at)ZOOstation(dot)cc>
To: Postgres Mailing list <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: PQfinish kills my app
Date: 1999-11-18 05:08:48
Message-ID: 383389E0.A139756F@ZOOstation.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Hi all, I have a small app that is dying whne PQfinsih() is called.

My app has two main options, -v and -a. It dies on -a, not -v.

The app will copy users mailfile and store this in the database. So my
options are -v for verbose output, and -a for all users. When run as
normal or -v it checks the users id, and calls function get_user_mail,
then exits via an exit_nicely function (straight from the sample progs).

When run with -a (for all) it runs function get_users_mail() which is a
simple loop that calls get_user_mail() for each user, then exits with
the same exit_nicely() function.

So I don't understand why it dies on PQfinish one way but not the
other. But, if I do not call exit_nicely (ie: just end without
PQfinish) ir dies on option -v but works for option -a

PS: By die I mean seagfault, I traced wit with gdb to the PQfinish
function. As I am new to the GNU tools (and fairly new to C) I am not
sure whats going on. I could post the code, but was not sure about the
list rules, it's 8 k long.

Thanks

--

Rob Brown-Bayliss
---====<*>====---

live from ZOOstation
http://www.ZOOstation.cc

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-11-18 05:45:47 Re: [INTERFACES] PQfinish kills my app
Previous Message <Miguel Sofer 1999-11-18 00:35:45 pgsql 0.2 does not work with tcl8.2 ?