chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23ca153
)
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>
Tue, 21 Oct 2014 00:07:11 +0000
(
01:07
+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 770ffc2a3d81879681f6bf72042b81e15e3578cf..58a89ee9f0cc978add45ca6a95d170103360b69a 100644
(file)
--- a/
polypath.c
+++ b/
polypath.c
@@
-475,6
+475,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();
}