summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-12-19 20:41:28 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-12-19 20:41:28 +0000
commit7240af4333a6e5055a5d4e88964f3e14625800de (patch)
treeaaf2130200b3476a7c1e8b5d2313fd8b992b0577
parent63a1fa96ccbe7a7099de721f5b72a4cbc43be8d4 (diff)
downloadtinyproxy-7240af4333a6e5055a5d4e88964f3e14625800de.tar.gz
tinyproxy-7240af4333a6e5055a5d4e88964f3e14625800de.zip
Changed the calls to write() to send() so that we can use send(...,
MSG_NOSIGNAL) and not get signals sent to the process. (easier for debugging and the system doesn't need to worry about signals.)
Diffstat (limited to '')
-rw-r--r--src/buffer.c4
-rw-r--r--src/sock.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index f60d5a2..8763d37 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,4 +1,4 @@
-/* $Id: buffer.c,v 1.18 2001-11-26 01:39:07 rjkaes Exp $
+/* $Id: buffer.c,v 1.19 2001-12-19 20:41:28 rjkaes Exp $
*
* The buffer used in each connection is a linked list of lines. As the lines
* are read in and written out the buffer expands and contracts. Basically,
@@ -259,7 +259,7 @@ write_buffer(int fd, struct buffer_s * buffptr)
line = BUFFER_HEAD(buffptr);
bytessent =
- write(fd, line->string + line->pos, line->length - line->pos);
+ send(fd, line->string + line->pos, line->length - line->pos, MSG_NOSIGNAL);
if (bytessent >= 0) {
/* bytes sent, adjust buffer */
diff --git a/src/sock.c b/src/sock.c
index df35e38..3fa0833 100644
--- a/src/sock.c
+++ b/src/sock.c
@@ -1,4 +1,4 @@
-/* $Id: sock.c,v 1.21 2001-12-17 00:00:24 rjkaes Exp $
+/* $Id: sock.c,v 1.22 2001-12-19 20:41:28 rjkaes Exp $
*
* Sockets are created and destroyed here. When a new connection comes in from
* a client, we need to copy the socket and the create a second socket to the
@@ -286,7 +286,7 @@ safe_write(int fd, const char *buffer, size_t count)
bytestosend = count;
while (1) {
- len = write(fd, buffer, bytestosend);
+ len = send(fd, buffer, bytestosend, MSG_NOSIGNAL);
if (len < 0) {
if (errno == EINTR)