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.)
This commit is contained in:
1 parent
63a1fa96cc
commit
7240af4333
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user