[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: SIGPIPE (again)
On Sunday August 10, "Kurt D. Zeilenga" wrote:
> I really don't see this approach fixing much... but it may
How would it not fix the SIGPIPEs going to apps?
> break a few things. Note that send(2) only works for sockets
> while write(2) works on most any kind of descriptor. While
> normally the library is used with sockets, it can be used
> with pipes, files, and such.
Hmm, so liblber sometimes talks to files/pipes in sockbuf.c?
This is the patch:
*** sockbuf.c 2003-08-08 10:55:36.000000000 -0700
--- sockbuf.c.orig 2003-08-08 10:56:33.000000000 -0700
***************
*** 487,493 ****
return nread( sbiod->sbiod_sb->sb_fd, buf, len );
#else
! return tcpread( sbiod->sbiod_sb->sb_fd, buf, len );
#endif
}
--- 487,493 ----
return nread( sbiod->sbiod_sb->sb_fd, buf, len );
#else
! return read( sbiod->sbiod_sb->sb_fd, buf, len );
#endif
}
***************
*** 540,546 ****
return write( sbiod->sbiod_sb->sb_fd, buf,
(len<MAX_WRITE) ? len : MAX_WRITE);
#else
! return tcpwrite( sbiod->sbiod_sb->sb_fd, buf, len );
#endif
}
--- 540,546 ----
return write( sbiod->sbiod_sb->sb_fd, buf,
(len<MAX_WRITE) ? len : MAX_WRITE);
#else
! return write( sbiod->sbiod_sb->sb_fd, buf, len );
#endif
}
Plus another patch to change the def of tcpwrite/tcpread on linux.
-Seth