freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Dave Blob <blob AT saghill.com>
- To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
- Subject: Re: patch for SIGPIPE in tds_write_packet
- Date: Tue, 25 Jan 2000 15:51:52 -0500
That one is subtle, I beleive it varies from OS to OS. Some, I beleive,
give you EPIPE, if you are ignoring SIG_PIPE, and not the number of
bytes read...
- Dave
-----Original Message-----
From: Mark Schaal [mailto:mark AT champ.tstonramp.com]
Sent: Tuesday, January 25, 2000 3:16 PM
To: TDS Development Group
Subject: [freetds] Re: patch for SIGPIPE in tds_write_packet
>
> So for some reason, when MS SQL disconnects you get a SIGPIPE signal
when
> trying to write to the fd, whereas with Sybase this doesn't happen.
>
> Anyway, this code seems to fix that, I'm not sure if we'd need to put
a
> SIGPIPE check around the read (do you get bad pipe or does it just
return
> EIO, EBADF or EINVAL??).
That type of information is usually available in the man pages.
"If a read() is interrupted by a signal before it reads any
data, it will return -1 with errno set to EINTR.
If a read() is interrupted by a signal after it has success-
fully read some data, it will return the number of bytes
read."
>
> There will probably be more places to add in checks for tds->s.
>
> And I have yet another gripe with gdb. For some reason it crashes when
I try
> any signal handling at all. Joy. I guess I ought to upgrade gdb... ;-)
>
> Geoff
Mark
--
Mark J. Schaal Phone: (909)
620-7724
TST On Ramp Fax: (909)
620-8174
System Administrator E-Mail:
mark AT tstonramp.com
---
You are currently subscribed to freetds as: blob AT saghill.com
To unsubscribe, forward this message to
$subst('Email.Unsub')
-
patch for SIGPIPE in tds_write_packet,
Geoff Winkless, 01/25/2000
- <Possible follow-up(s)>
- Re: patch for SIGPIPE in tds_write_packet, Mark Schaal, 01/25/2000
- Re: patch for SIGPIPE in tds_write_packet, Dave Blob, 01/25/2000
- Re: patch for SIGPIPE in tds_write_packet, Geoff Winkless, 01/26/2000
- Re: patch for SIGPIPE in tds_write_packet, Mark Schaal, 01/26/2000
- Re: patch for SIGPIPE in tds_write_packet, James Cameron, 01/26/2000
- Re: patch for SIGPIPE in tds_write_packet, Brian Bruns, 01/26/2000
- Re: patch for SIGPIPE in tds_write_packet, Brian Bruns, 01/26/2000
Archive powered by MHonArc 2.6.24.