chiark
/
gitweb
/
~ian
/
secnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
285d266
)
polypath: Close parent's socket in child
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 1 Oct 2014 17:20:44 +0000
(18:20 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 2 Oct 2014 15:41:56 +0000
(16:41 +0100)
Previously this would happen automatically due to CLOEXEC, but we are
going to have a long-running child, which needs to not have a copy of
this fd.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
polypath.c
patch
|
blob
|
history
diff --git
a/polypath.c
b/polypath.c
index a07bdfc5fc4381dee37cae8b639497b2fc8cc195..8b60ac2136eb9148c0a23af58c0f069cb07e7d94 100644
(file)
--- a/
polypath.c
+++ b/
polypath.c
@@
-474,6
+474,7
@@
static void start_subproc(struct polypath *st, void (*make_fdpair)(int[2]),
pid_t pid=fork();
if (!pid) {
afterfork();
+ close(pfds[0]);
child(st,pfds[1]);
abort();
}