pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE
3+ messages / 1 participants
[nested] [flat]

* [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE
@ 2009-01-02 17:30  noreply@pgfoundry.org
  0 siblings, 0 replies; 3+ messages in thread

From: noreply@pgfoundry.org @ 2009-01-02 17:30 UTC (permalink / raw)
  To: noreply@pgfoundry.org

Bugs item #1010541, was opened at 2008-12-29 15:42
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Feldman (brianfeldman)
Assigned to: Hiroshi Inoue (hinoue)
Summary: applications crash with SIGPIPE

Initial Comment:
Any time a PostgreSQL server is restarted, applications using the ODBC driver to connect to it will get a SIGPIPE and often crash because of it.  Libraries have no business generating SIGPIPE, so MSG_NOSIGNAL/MSG_NOSIGPIPE/etc. should be specified for the send(2) calls instead.

----------------------------------------------------------------------

>Comment By: Brian Feldman (brianfeldman)
Date: 2009-01-02 12:30

Message:
Yes, it would simply be ideal, I think, to define a platform
specific SENDFLAGS and use that for all send() calls, i.e.
simply:
/*
 * Do not generate SIGPIPE for applications that get
disconnected.
 */
#if defined(MSG_NOSIGNAL)
#define SENDFLAGS MSG_NOSIGNAL
#elif defined(MSG_NOSIGPIPE)
#define SENDFLAGS MSG_NOSIGPIPE
#else
#define SENDFLAGS 0
#end

It seems that Windows actually did not copy the socket
SIGPIPE design mistake from Unix.  If it did, I think it
would be appropriate to disable it there as well.  Some Unix
platforms don't have a way to disable SIGPIPE at all,
unfortunately, so it cannot be consistent.  Thank you for
your help!

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2008-12-30 18:00

Message:
I can't such values in Windows. Is it related to *nix platforms? If so I would take care od it in the next release.


----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE
@ 2009-01-04 03:01  noreply@pgfoundry.org
  0 siblings, 0 replies; 3+ messages in thread

From: noreply@pgfoundry.org @ 2009-01-04 03:01 UTC (permalink / raw)
  To: noreply@pgfoundry.org

Bugs item #1010541, was opened at 2008-12-29 20:42
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Brian Feldman (brianfeldman)
Assigned to: Hiroshi Inoue (hinoue)
Summary: applications crash with SIGPIPE

Initial Comment:
Any time a PostgreSQL server is restarted, applications using the ODBC driver to connect to it will get a SIGPIPE and often crash because of it.  Libraries have no business generating SIGPIPE, so MSG_NOSIGNAL/MSG_NOSIGPIPE/etc. should be specified for the send(2) calls instead.

----------------------------------------------------------------------

>Comment By: Hiroshi Inoue (hinoue)
Date: 2009-01-04 03:01

Message:
I've just committed a change to CVS according to your
suggestion.

Thanks.
Hiroshi Inoue

----------------------------------------------------------------------

Comment By: Brian Feldman (brianfeldman)
Date: 2009-01-02 17:30

Message:
Yes, it would simply be ideal, I think, to define a platform
specific SENDFLAGS and use that for all send() calls, i.e.
simply:
/*
 * Do not generate SIGPIPE for applications that get
disconnected.
 */
#if defined(MSG_NOSIGNAL)
#define SENDFLAGS MSG_NOSIGNAL
#elif defined(MSG_NOSIGPIPE)
#define SENDFLAGS MSG_NOSIGPIPE
#else
#define SENDFLAGS 0
#end

It seems that Windows actually did not copy the socket
SIGPIPE design mistake from Unix.  If it did, I think it
would be appropriate to disable it there as well.  Some Unix
platforms don't have a way to disable SIGPIPE at all,
unfortunately, so it cannot be consistent.  Thank you for
your help!

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2008-12-30 23:00

Message:
I can't such values in Windows. Is it related to *nix platforms? If so I would take care od it in the next release.


----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE
@ 2010-05-21 03:56  noreply@pgfoundry.org
  0 siblings, 0 replies; 3+ messages in thread

From: noreply@pgfoundry.org @ 2010-05-21 03:56 UTC (permalink / raw)
  To: noreply@pgfoundry.org

Bugs item #1010541, was opened at 2008-12-29 20:42
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125

Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Brian Feldman (brianfeldman)
Assigned to: Hiroshi Inoue (hinoue)
Summary: applications crash with SIGPIPE

Initial Comment:
Any time a PostgreSQL server is restarted, applications using the ODBC driver to connect to it will get a SIGPIPE and often crash because of it.  Libraries have no business generating SIGPIPE, so MSG_NOSIGNAL/MSG_NOSIGPIPE/etc. should be specified for the send(2) calls instead.

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2009-01-04 03:01

Message:
I've just committed a change to CVS according to your
suggestion.

Thanks.
Hiroshi Inoue

----------------------------------------------------------------------

Comment By: Brian Feldman (brianfeldman)
Date: 2009-01-02 17:30

Message:
Yes, it would simply be ideal, I think, to define a platform
specific SENDFLAGS and use that for all send() calls, i.e.
simply:
/*
 * Do not generate SIGPIPE for applications that get
disconnected.
 */
#if defined(MSG_NOSIGNAL)
#define SENDFLAGS MSG_NOSIGNAL
#elif defined(MSG_NOSIGPIPE)
#define SENDFLAGS MSG_NOSIGPIPE
#else
#define SENDFLAGS 0
#end

It seems that Windows actually did not copy the socket
SIGPIPE design mistake from Unix.  If it did, I think it
would be appropriate to disable it there as well.  Some Unix
platforms don't have a way to disable SIGPIPE at all,
unfortunately, so it cannot be consistent.  Thank you for
your help!

----------------------------------------------------------------------

Comment By: Hiroshi Inoue (hinoue)
Date: 2008-12-30 23:00

Message:
I can't such values in Windows. Is it related to *nix platforms? If so I would take care od it in the next release.


----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010541&group_id=1000125



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-05-21 03:56 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 17:30 [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE noreply@pgfoundry.org
2009-01-04 03:01 [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE noreply@pgfoundry.org
2010-05-21 03:56 [ psqlodbc-Bugs-1010541 ] applications crash with SIGPIPE noreply@pgfoundry.org

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