Skip to Content.
Sympa Menu

freetds - Re: patch for SIGPIPE in tds_write_packet

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Mark Schaal <mark AT champ.tstonramp.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: patch for SIGPIPE in tds_write_packet
  • Date: Tue, 25 Jan 2000 12:16:04 -0800 (PST)


>
> 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




Archive powered by MHonArc 2.6.24.

Top of Page