X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C22CE9DCA86 for ; Sun, 12 Mar 2006 07:30:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88803-03 for ; Sun, 12 Mar 2006 07:30:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fep07.ttnet.net.tr (mail.ttnet.net.tr [212.175.13.129]) by postgresql.org (Postfix) with ESMTP id 3156A9DCA67 for ; Sun, 12 Mar 2006 07:30:14 -0400 (AST) Received: from alamut ([85.96.109.238]) by fep07.ttnet.net.tr with ESMTP id <20060312112923.BCNF25116.fep07.ttnet.net.tr@alamut> for ; Sun, 12 Mar 2006 13:29:23 +0200 Date: Sun, 12 Mar 2006 13:28:03 +0200 From: Volkan YAZICI To: pgsql-interfaces@postgresql.org Subject: Receiving SIGPIPE for PQfinish() Message-ID: <20060312112803.GA490@alamut> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-NAI-Spam-Rules: 1 Rules triggered BAYES_01=-1.2 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.253 required=5 tests=[AWL=-0.545, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, DNS_FROM_RFC_WHOIS=0.879] X-Spam-Score: 2.253 X-Spam-Level: ** X-Archive-Number: 200603/7 X-Sequence-Number: 6063 Hi, I've a problem when calling PQfinish() on a broken connection. Breakpoint 1, main () at finish.c:9 9 PGconn *conn = PQconnectdb("dbname=test"); (gdb) n 11 if (PQstatus(conn) != CONNECTION_OK) (gdb) n 18 PQfinish(conn); Shutting down postmaster in here (or restarting on another port). (gdb) n Program received signal SIGPIPE, Broken pipe. 0xffffe410 in ?? () (gdb) bt #0 0xffffe410 in ?? () #1 0xbfafd368 in ?? () #2 0xb7fe8308 in ?? () from ../usr/lib/libpq.so.4 #3 0xbfafd340 in ?? () #4 0xb7f68321 in send () from /lib/libc.so.6 #5 0xb7fe24a3 in pqsecure_write (conn=0xffffffe0, ptr=0xffffffe0, len=4294967264) at fe-secure.c:480 #6 0xb7fdbc9a in pqSendSome (conn=0x804a008, len=5) at fe-misc.c:757 #7 0xb7fd5448 in closePGconn (conn=0x804a008) at fe-connect.c:1973 #8 0xb7fd5475 in PQfinish (conn=0x804a008) at fe-connect.c:2033 #9 0x080485f1 in main () at finish.c:18 Should I handle SIGPIPE each time I call PQfinish() manually or should PQfinish() be responsible for this task? Regards.