Received: from ZOOstation.cc (IDENT:root@b002-m010-p055.acld.clear.net.nz [203.167.200.118]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA59219 for ; Thu, 18 Nov 1999 00:09:29 -0500 (EST) (envelope-from rob@ZOOstation.cc) Received: from ZOOstation.cc (IDENT:rob@localhost [127.0.0.1]) by ZOOstation.cc (8.9.3/8.8.7) with ESMTP id SAA23980 for ; Thu, 18 Nov 1999 18:08:49 +1300 Sender: rob@ZOOstation.cc Message-ID: <383389E0.A139756F@ZOOstation.cc> Date: Thu, 18 Nov 1999 18:08:48 +1300 From: Rob Brown-Bayliss Organization: ZOOstation X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Postgres Mailing list Subject: PQfinish kills my app Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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