Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
096c79f
)
lib: Use nonblocking-behavior forwarding explicitly for cf-using programs.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 15 Jan 2013 07:21:08 +0000
(08:21 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 15 Jan 2013 07:21:08 +0000
(08:21 +0100)
lib/cf.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/cf.c
b/lib/cf.c
index
38d9808
..
96181ee
100644
(file)
--- a/
lib/cf.c
+++ b/
lib/cf.c
@@
-23,6
+23,7
@@
#include <ctype.h>
#include <glob.h>
#include <libgen.h>
#include <ctype.h>
#include <glob.h>
#include <libgen.h>
+#include <sys/socket.h>
#include <errno.h>
#ifdef HAVE_CONFIG_H
#include <errno.h>
#ifdef HAVE_CONFIG_H
@@
-309,12
+310,12
@@
static int stdhandle(struct child *ch, struct hthead *req, int fd, void (*chinit
if(i->type == CH_SOCKET) {
if(i->fd < 0)
i->fd = stdmkchild(i->argv, chinit, idata);
if(i->type == CH_SOCKET) {
if(i->fd < 0)
i->fd = stdmkchild(i->argv, chinit, idata);
- if(sendreq
(i->fd, req, fd
)) {
+ if(sendreq
2(i->fd, req, fd, MSG_NOSIGNAL | MSG_DONTWAIT
)) {
if((errno == EPIPE) || (errno == ECONNRESET)) {
/* Assume that the child has crashed and restart it. */
close(i->fd);
i->fd = stdmkchild(i->argv, chinit, idata);
if((errno == EPIPE) || (errno == ECONNRESET)) {
/* Assume that the child has crashed and restart it. */
close(i->fd);
i->fd = stdmkchild(i->argv, chinit, idata);
- if(!sendreq
(i->fd, req, fd
))
+ if(!sendreq
2(i->fd, req, fd, MSG_NOSIGNAL | MSG_DONTWAIT
))
return(0);
}
flog(LOG_ERR, "could not pass on request to child %s: %s", ch->name, strerror(errno));
return(0);
}
flog(LOG_ERR, "could not pass on request to child %s: %s", ch->name, strerror(errno));