pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
PQfinish kills my app 2+ messages / 2 participants [nested] [flat]
* PQfinish kills my app @ 1999-11-18 05:08 Rob Brown-Bayliss <rob@ZOOstation.cc> 0 siblings, 1 reply; 2+ messages in thread From: Rob Brown-Bayliss @ 1999-11-18 05:08 UTC (permalink / raw) To: 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] PQfinish kills my app @ 1999-11-18 05:45 Tom Lane <tgl@sss.pgh.pa.us> parent: Rob Brown-Bayliss <rob@ZOOstation.cc> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 1999-11-18 05:45 UTC (permalink / raw) To: Rob Brown-Bayliss <rob@ZOOstation.cc>; +Cc: pgsql-interfaces Rob Brown-Bayliss <rob@ZOOstation.cc> writes: > 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 Kinda sounds like you might be calling PQfinish more than once on the same connection object. That's a no-no. > 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. People have posted much larger messages than 8k with less reason. If the multiple-calls idea doesn't pan out, let's see it... regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-11-18 05:45 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 1999-11-18 05:08 PQfinish kills my app Rob Brown-Bayliss <rob@ZOOstation.cc> 1999-11-18 05:45 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox