From: | Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Receiving SIGPIPE for PQfinish(<broken-connection>) |
Date: | 2006-03-12 11:28:03 |
Message-ID: | 20060312112803.GA490@alamut |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-12 16:18:54 | Re: Receiving SIGPIPE for PQfinish(<broken-connection>) |
Previous Message | setyawankim | 2006-03-10 17:55:57 | unsubscribe |