projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19e0d44
)
Use socketpair() instead of pipe() for the umbilical.
author
Guus Sliepen
<guus@tinc-vpn.org>
Wed, 20 May 2015 19:28:54 +0000
(21:28 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Wed, 20 May 2015 19:28:54 +0000
(21:28 +0200)
This prepares for a possible conversion of the umbilical socket to a
control socket.
src/tincctl.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index c6d4aac51dfb853baf60a393a7199916aa74b3bf..bbc5c026022c7f7f4bfb0a3f7e23238bf92949de 100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-854,8
+854,8
@@
static int cmd_start(int argc, char *argv[]) {
return status;
#else
int pfd[2] = {-1, -1};
- if(
pipe(
pfd)) {
- fprintf(stderr, "Could not create umbilical
pipe
: %s\n", strerror(errno));
+ if(
socketpair(AF_UNIX, SOCK_STREAM, 0,
pfd)) {
+ fprintf(stderr, "Could not create umbilical
socket
: %s\n", strerror(errno));
free(nargv);
return 1;
}