chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
site: Permit transport-peers-max to be equal to MAX_PEER_ADDRS
[secnet]
/
util.c
diff --git
a/util.c
b/util.c
index fc6f6264cf433ba84211858df529b986b377b714..aa85559b37be4113800c623e8dbae4dfcd0ab716 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-169,6
+169,13
@@
void setcloexec(int fd) {
if (r<0) fatal_perror("fcntl(,F_SETFD,|FD_CLOEXEC) failed");
}
if (r<0) fatal_perror("fcntl(,F_SETFD,|FD_CLOEXEC) failed");
}
+void pipe_cloexec(int fd[2]) {
+ int r=pipe(fd);
+ if (r) fatal_perror("pipe");
+ setcloexec(fd[0]);
+ setcloexec(fd[1]);
+}
+
static const char *phases[NR_PHASES]={
"PHASE_INIT",
"PHASE_GETOPTS",
static const char *phases[NR_PHASES]={
"PHASE_INIT",
"PHASE_GETOPTS",