Skip site navigation (1) Skip section navigation (2)

Receiving SIGPIPE for PQfinish(<broken-connection>)

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 (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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/
  #3  0xbfafd340 in ?? ()
  #4  0xb7f68321 in send () from /lib/
  #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?



pgsql-interfaces by date

Next:From: Tom LaneDate: 2006-03-12 16:18:54
Subject: Re: Receiving SIGPIPE for PQfinish(<broken-connection>)
Previous:From: setyawankimDate: 2006-03-10 17:55:57
Subject: unsubscribe

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group