~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide ARRAY_SIZE
[secnet]
/
secnet.c
diff --git
a/secnet.c
b/secnet.c
index
465a93f
..
7fabb1b
100644
(file)
--- a/
secnet.c
+++ b/
secnet.c
@@
-332,7
+332,8
@@
static void run(void)
fatal("run: beforepoll_fn (%s) returns %d",i->desc,rv);
}
if (timeout<-1) {
fatal("run: beforepoll_fn (%s) returns %d",i->desc,rv);
}
if (timeout<-1) {
- fatal("run: beforepoll_fn (%s) set timeout to %d",timeout);
+ fatal("run: beforepoll_fn (%s) set timeout to %d",
+ i->desc,timeout);
}
idx+=nfds;
remain-=nfds;
}
idx+=nfds;
remain-=nfds;
@@
-402,9
+403,7
@@
static void become_daemon(void)
}
if (secnet_is_daemon) {
/* stderr etc are redirected to the system/log facility */
}
if (secnet_is_daemon) {
/* stderr etc are redirected to the system/log facility */
- if (pipe(errfds)!=0) {
- fatal_perror("can't create pipe for stderr");
- }
+ pipe_cloexec(errfds);
if (dup2(errfds[1],0) < 0
|| dup2(errfds[1],1) < 0
|| dup2(errfds[1],2) < 0)
if (dup2(errfds[1],0) < 0
|| dup2(errfds[1],1) < 0
|| dup2(errfds[1],2) < 0)