diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-18 17:05:43 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-19 18:06:24 -0700 |
commit | fb89e1a26fabdb47fcf8a791b1fbd8418f3ce60f (patch) | |
tree | 9813214d465a486892d480133fcc4b2ad9fcb8e7 /postfork.cpp | |
parent | e849beabbab31c83ac57693cb0a7ac1e58f8cfd5 (diff) |
Reenable free_redirected_fds_from_pipes.
Diffstat (limited to 'postfork.cpp')
-rw-r--r-- | postfork.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/postfork.cpp b/postfork.cpp index 82d15e17..2a00581b 100644 --- a/postfork.cpp +++ b/postfork.cpp @@ -107,8 +107,8 @@ int set_child_group(job_t *j, process_t *p, int print_errors) return res; } -/** Make sure the fd used by each redirection is not used by a pipe. */ -static void free_redirected_fds_from_pipes(io_chain_t &io_chain) +/** Make sure the fd used by each redirection is not used by a pipe. Note that while this does not modify the vector, it does modify the IO redirections within (gulp) */ +static void free_redirected_fds_from_pipes(const io_chain_t &io_chain) { size_t max = io_chain.size(); for (size_t i = 0; i < max; i++) @@ -170,7 +170,7 @@ static int handle_child_io(const io_chain_t &io_chain) { //fprintf(stderr, "child IO for %d\n", getpid()); close_unused_internal_pipes(io_chain); - //free_redirected_fds_from_pipes(io_chain); + free_redirected_fds_from_pipes(io_chain); for (size_t idx = 0; idx < io_chain.size(); idx++) { io_data_t *io = io_chain.at(idx).get(); @@ -444,7 +444,7 @@ bool fork_actions_make_spawn_properties(posix_spawnattr_t *attr, posix_spawn_fil err = posix_spawnattr_setsigmask(attr, &sigmask); /* Make sure that our pipes don't use an fd that the redirection itself wants to use */ - //free_redirected_fds_from_pipes(j->io); + free_redirected_fds_from_pipes(j->io_chain()); /* Close unused internal pipes */ std::vector<int> files_to_close; |