From 6a3159197f21b14c2f74584bcbd0d63266b5db47 Mon Sep 17 00:00:00 2001 From: Alexander Gluzsky Date: Mon, 4 Feb 2013 16:43:34 +0000 Subject: cleanup usgin older boost api for backward compatibility git-svn-id: http://svn.miranda-ng.org/main/trunk@3424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../src/include/boost/process/posix/child.hpp | 26 ----- .../include/boost/process/posix/create_pipe.hpp | 40 ------- .../src/include/boost/process/posix/execute.hpp | 82 -------------- .../src/include/boost/process/posix/executor.hpp | 120 --------------------- .../include/boost/process/posix/initializers.hpp | 39 ------- .../boost/process/posix/initializers/bind_fd.hpp | 43 -------- .../process/posix/initializers/bind_stderr.hpp | 37 ------- .../process/posix/initializers/bind_stdin.hpp | 37 ------- .../process/posix/initializers/bind_stdout.hpp | 37 ------- .../boost/process/posix/initializers/close_fd.hpp | 35 ------ .../boost/process/posix/initializers/close_fds.hpp | 43 -------- .../process/posix/initializers/close_fds_if.hpp | 80 -------------- .../process/posix/initializers/close_stderr.hpp | 30 ------ .../process/posix/initializers/close_stdin.hpp | 30 ------ .../process/posix/initializers/close_stdout.hpp | 30 ------ .../process/posix/initializers/hide_console.hpp | 24 ----- .../process/posix/initializers/inherit_env.hpp | 36 ------- .../posix/initializers/initializer_base.hpp | 35 ------ .../posix/initializers/notify_io_service.hpp | 55 ---------- .../process/posix/initializers/on_exec_error.hpp | 42 -------- .../process/posix/initializers/on_exec_setup.hpp | 42 -------- .../process/posix/initializers/on_fork_error.hpp | 42 -------- .../process/posix/initializers/on_fork_setup.hpp | 42 -------- .../process/posix/initializers/on_fork_success.hpp | 42 -------- .../boost/process/posix/initializers/run_exe.hpp | 59 ---------- .../boost/process/posix/initializers/set_args.hpp | 57 ---------- .../process/posix/initializers/set_cmd_line.hpp | 54 ---------- .../boost/process/posix/initializers/set_env.hpp | 54 ---------- .../process/posix/initializers/set_on_error.hpp | 95 ---------------- .../process/posix/initializers/start_in_dir.hpp | 36 ------- .../process/posix/initializers/throw_on_error.hpp | 90 ---------------- .../src/include/boost/process/posix/pipe.hpp | 30 ------ .../include/boost/process/posix/search_path.hpp | 53 --------- .../src/include/boost/process/posix/shell_path.hpp | 32 ------ .../src/include/boost/process/posix/terminate.hpp | 37 ------- .../include/boost/process/posix/wait_for_exit.hpp | 52 --------- .../include/boost/process/windows/search_path.hpp | 8 +- 37 files changed, 4 insertions(+), 1722 deletions(-) delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/child.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/create_pipe.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/execute.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/executor.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/bind_fd.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stderr.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdin.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdout.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_fd.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds_if.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_stderr.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdin.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdout.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/hide_console.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/inherit_env.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/initializer_base.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/notify_io_service.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_error.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_setup.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_error.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_setup.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_success.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/run_exe.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/set_args.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/set_cmd_line.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/set_env.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/set_on_error.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/start_in_dir.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/initializers/throw_on_error.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/pipe.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/search_path.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/shell_path.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/terminate.hpp delete mode 100644 plugins/New_GPG/src/include/boost/process/posix/wait_for_exit.hpp mode change 100644 => 100755 plugins/New_GPG/src/include/boost/process/windows/search_path.hpp (limited to 'plugins/New_GPG/src/include/boost') diff --git a/plugins/New_GPG/src/include/boost/process/posix/child.hpp b/plugins/New_GPG/src/include/boost/process/posix/child.hpp deleted file mode 100644 index 913484529e..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/child.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_CHILD_HPP -#define BOOST_PROCESS_POSIX_CHILD_HPP - -#include - -namespace boost { namespace process { namespace posix { - -struct child -{ - pid_t pid; - - explicit child(pid_t p) : pid(p) {} -}; - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/create_pipe.hpp b/plugins/New_GPG/src/include/boost/process/posix/create_pipe.hpp deleted file mode 100644 index ecdd523516..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/create_pipe.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_CREATE_PIPE_HPP -#define BOOST_PROCESS_POSIX_CREATE_PIPE_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -inline pipe create_pipe() -{ - int fds[2]; - if (::pipe(fds) == -1) - BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("pipe(2) failed"); - return pipe(fds[0], fds[1]); -} - -inline pipe create_pipe(boost::system::error_code &ec) -{ - int fds[2]; - if (::pipe(fds) == -1) - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec); - else - ec.clear(); - return pipe(fds[0], fds[1]); -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/execute.hpp b/plugins/New_GPG/src/include/boost/process/posix/execute.hpp deleted file mode 100644 index 27082196c8..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/execute.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_EXECUTE_HPP -#define BOOST_PROCESS_POSIX_EXECUTE_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -template -child execute(const I0 &i0) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0))); -} - -template -child execute(const I0 &i0, const I1 &i1) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4, const I5 &i5) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4), boost::cref(i5))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4, const I5 &i5, const I6 &i6) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4), boost::cref(i5), boost::cref(i6))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4, const I5 &i5, const I6 &i6, const I7 &i7) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4), boost::cref(i5), boost::cref(i6), boost::cref(i7))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4, const I5 &i5, const I6 &i6, const I7 &i7, const I8 &i8) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4), boost::cref(i5), boost::cref(i6), boost::cref(i7), boost::cref(i8))); -} - -template -child execute(const I0 &i0, const I1 &i1, const I2 &i2, const I3 &i3, const I4 &i4, const I5 &i5, const I6 &i6, const I7 &i7, const I8 &i8, const I9 &i9) -{ - return executor()(boost::fusion::make_tuple(boost::cref(i0), boost::cref(i1), boost::cref(i2), boost::cref(i3), boost::cref(i4), boost::cref(i5), boost::cref(i6), boost::cref(i7), boost::cref(i8), boost::cref(i9))); -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/executor.hpp b/plugins/New_GPG/src/include/boost/process/posix/executor.hpp deleted file mode 100644 index a3e81f128f..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/executor.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_EXECUTOR_HPP -#define BOOST_PROCESS_POSIX_EXECUTOR_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -struct executor -{ - executor() : exe(0), cmd_line(0), env(0) {} - - struct call_on_fork_setup - { - executor &e_; - - call_on_fork_setup(executor &e) : e_(e) {} - - template - void operator()(const Arg &arg) const - { - arg.on_fork_setup(e_); - } - }; - - struct call_on_fork_error - { - executor &e_; - - call_on_fork_error(executor &e) : e_(e) {} - - template - void operator()(Arg &arg) const - { - arg.on_fork_error(e_); - } - }; - - struct call_on_fork_success - { - executor &e_; - - call_on_fork_success(executor &e) : e_(e) {} - - template - void operator()(Arg &arg) const - { - arg.on_fork_success(e_); - } - }; - - struct call_on_exec_setup - { - executor &e_; - - call_on_exec_setup(executor &e) : e_(e) {} - - template - void operator()(Arg &arg) const - { - arg.on_exec_setup(e_); - } - }; - - struct call_on_exec_error - { - executor &e_; - - call_on_exec_error(executor &e) : e_(e) {} - - template - void operator()(Arg &arg) const - { - arg.on_exec_error(e_); - } - }; - - template - child operator()(const InitializerSequence &seq) - { - boost::fusion::for_each(seq, call_on_fork_setup(*this)); - - pid_t pid = ::fork(); - if (pid == -1) - { - boost::fusion::for_each(seq, call_on_fork_error(*this)); - } - else if (pid == 0) - { - boost::fusion::for_each(seq, call_on_exec_setup(*this)); - ::execve(exe, cmd_line, env); - boost::fusion::for_each(seq, call_on_exec_error(*this)); - _exit(EXIT_FAILURE); - } - - boost::fusion::for_each(seq, call_on_fork_success(*this)); - - return child(pid); - } - - const char *exe; - char **cmd_line; - char **env; -}; - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers.hpp deleted file mode 100644 index 78295c14cb..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_fd.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_fd.hpp deleted file mode 100644 index 851b7ef3e4..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_fd.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_BIND_FD_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_BIND_FD_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class bind_fd_ : public initializer_base -{ -public: - bind_fd_(int id, const FileDescriptor &fd) : id_(id), fd_(fd) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::dup2(fd_.handle(), id_); - } - -private: - int id_; - FileDescriptor fd_; -}; - -template -bind_fd_ bind_fd(int id, const FileDescriptor &fd) -{ - return bind_fd_(id, fd); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stderr.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stderr.hpp deleted file mode 100644 index be767bf2fe..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stderr.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDERR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDERR_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class bind_stderr : public initializer_base -{ -public: - explicit bind_stderr(const boost::iostreams::file_descriptor_sink &sink) - : sink_(sink) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::dup2(sink_.handle(), STDERR_FILENO); - } - -private: - boost::iostreams::file_descriptor_sink sink_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdin.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdin.hpp deleted file mode 100644 index b592d6f8b3..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdin.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDIN_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDIN_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class bind_stdin : public initializer_base -{ -public: - explicit bind_stdin(const boost::iostreams::file_descriptor_source &source) - : source_(source) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::dup2(source_.handle(), STDIN_FILENO); - } - -private: - boost::iostreams::file_descriptor_source source_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdout.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdout.hpp deleted file mode 100644 index a2c316d997..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/bind_stdout.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDOUT_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_BIND_STDOUT_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class bind_stdout : public initializer_base -{ -public: - explicit bind_stdout(const boost::iostreams::file_descriptor_sink &sink) - : sink_(sink) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::dup2(sink_.handle(), STDOUT_FILENO); - } - -private: - boost::iostreams::file_descriptor_sink sink_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fd.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fd.hpp deleted file mode 100644 index fd516e4100..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fd.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FD_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FD_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class close_fd : public initializer_base -{ -public: - explicit close_fd(int fd) : fd_(fd) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::close(fd_); - } - -private: - int fd_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds.hpp deleted file mode 100644 index 2fa338501e..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FDS_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FDS_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class close_fds_ : public initializer_base -{ -public: - explicit close_fds_(const Range &fds) : fds_(fds) {} - - template - void on_exec_setup(PosixExecutor&) const - { - boost::for_each(fds_, ::close); - } - -private: - Range fds_; -}; - -template -close_fds_ close_fds(const Range &fds) -{ - return close_fds_(fds); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds_if.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds_if.hpp deleted file mode 100644 index fb3a651d62..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_fds_if.hpp +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FDS_IF_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_FDS_IF_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef BOOST_PROCESS_POSIX_MAX_FD -# define BOOST_PROCESS_POSIX_MAX_FD 32 -#endif - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class close_fds_if_ : public initializer_base -{ -private: - static void close(int fd) - { - ::fcntl(fd, F_SETFD, FD_CLOEXEC); - } - -public: - explicit close_fds_if_(const Predicate &pred) : pred_(pred) {} - - template - void on_exec_setup(PosixExecutor&) const - { - boost::for_each( - boost::adaptors::filter( - boost::counting_range(0, upper_bound()), - pred_ - ), - close - ); - } - -private: - static int upper_bound() - { - int up; -#if defined(F_MAXFD) - do - { - up = ::fcntl(0, F_MAXFD); - } while (up == -1 && errno == EINTR); - if (up == -1) -#endif - up = ::sysconf(_SC_OPEN_MAX); - if (up == -1) - up = BOOST_PROCESS_POSIX_MAX_FD; - return up; - } - - Predicate pred_; -}; - -template -close_fds_if_ close_fds_if(const Predicate &pred) -{ - return close_fds_if_(pred); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stderr.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stderr.hpp deleted file mode 100644 index 1a4c2ad00d..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stderr.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDERR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDERR_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class close_stderr : public initializer_base -{ -public: - template - void on_exec_setup(PosixExecutor&) const - { - ::close(STDERR_FILENO); - } -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdin.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdin.hpp deleted file mode 100644 index 021c3ec54d..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdin.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDIN_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDIN_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class close_stdin : public initializer_base -{ -public: - template - void on_exec_setup(PosixExecutor&) const - { - ::close(STDIN_FILENO); - } -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdout.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdout.hpp deleted file mode 100644 index cfab7d1d62..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/close_stdout.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDOUT_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_CLOSE_STDOUT_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class close_stdout : public initializer_base -{ -public: - template - void on_exec_setup(PosixExecutor&) const - { - ::close(STDOUT_FILENO); - } -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/hide_console.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/hide_console.hpp deleted file mode 100644 index 20d527b457..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/hide_console.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_HIDE_CONSOLE_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_HIDE_CONSOLE_HPP - -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class hide_console : public initializer_base -{ -public: -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/inherit_env.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/inherit_env.hpp deleted file mode 100644 index bc73c8571f..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/inherit_env.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_INHERIT_ENV_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_INHERIT_ENV_HPP - -#include -// From -#if defined(__APPLE__) && defined(__DYNAMIC__) -extern "C" { extern char ***_NSGetEnviron(void); } -# define environ (*_NSGetEnviron()) -#else -# include -#endif - -namespace boost { namespace process { namespace posix { namespace initializers { - -class inherit_env : public initializer_base -{ -public: - template - void on_fork_setup(PosixExecutor &e) const - { - e.env = environ; - } -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/initializer_base.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/initializer_base.hpp deleted file mode 100644 index 775f00e48c..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/initializer_base.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_INITIALIZER_BASE_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_INITIALIZER_BASE_HPP - -namespace boost { namespace process { namespace posix { namespace initializers { - -struct initializer_base -{ - template - void on_fork_setup(PosixExecutor&) const {} - - template - void on_fork_error(PosixExecutor&) const {} - - template - void on_fork_success(PosixExecutor&) const {} - - template - void on_exec_setup(PosixExecutor&) const {} - - template - void on_exec_error(PosixExecutor&) const {} -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/notify_io_service.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/notify_io_service.hpp deleted file mode 100644 index d94f674c81..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/notify_io_service.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_NOTIFY_IO_SERVICE_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_NOTIFY_IO_SERVICE_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class notify_io_service_ : public initializer_base -{ -public: - explicit notify_io_service_(IOService &io_service) : - io_service_(io_service) {} - - template - void on_fork_setup(PosixExecutor&) const - { - io_service_.notify_fork(IOService::fork_prepare); - } - - template - void on_fork_success(PosixExecutor&) const - { - io_service_.notify_fork(IOService::fork_parent); - } - - template - void on_exec_setup(PosixExecutor&) const - { - io_service_.notify_fork(IOService::fork_child); - } - -private: - IOService &io_service_; -}; - -template -notify_io_service_ notify_io_service(IOService &io_service) -{ - return notify_io_service_(io_service); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_error.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_error.hpp deleted file mode 100644 index 63b56def4f..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_error.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_ON_EXEC_ERROR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_ON_EXEC_ERROR_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class on_exec_error_ : public initializer_base -{ -public: - explicit on_exec_error_(Handler handler) : handler_(handler) {} - - template - void on_exec_error(PosixExecutor &e) const - { - handler_(e); - } - -private: - Handler handler_; -}; - -template -on_exec_error_ on_exec_error(Handler handler) -{ - return on_exec_error_(handler); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_setup.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_setup.hpp deleted file mode 100644 index 50f5f3736b..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_exec_setup.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_ON_EXEC_SETUP_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_ON_EXEC_SETUP_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class on_exec_setup_ : public initializer_base -{ -public: - explicit on_exec_setup_(Handler handler) : handler_(handler) {} - - template - void on_exec_setup(PosixExecutor &e) const - { - handler_(e); - } - -private: - Handler handler_; -}; - -template -on_exec_setup_ on_exec_setup(Handler handler) -{ - return on_exec_setup_(handler); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_error.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_error.hpp deleted file mode 100644 index 42ecf1aac9..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_error.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_ERROR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_ERROR_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class on_fork_error_ : public initializer_base -{ -public: - explicit on_fork_error_(Handler handler) : handler_(handler) {} - - template - void on_fork_error(PosixExecutor &e) const - { - handler_(e); - } - -private: - Handler handler_; -}; - -template -on_fork_error_ on_fork_error(Handler handler) -{ - return on_fork_error_(handler); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_setup.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_setup.hpp deleted file mode 100644 index c0c5b0682f..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_setup.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_SETUP_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_SETUP_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class on_fork_setup_ : public initializer_base -{ -public: - explicit on_fork_setup_(Handler handler) : handler_(handler) {} - - template - void on_fork_setup(PosixExecutor &e) const - { - handler_(e); - } - -private: - Handler handler_; -}; - -template -on_fork_setup_ on_fork_setup(Handler handler) -{ - return on_fork_setup_(handler); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_success.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_success.hpp deleted file mode 100644 index 01c9b12db0..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/on_fork_success.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_SUCCESS_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_ON_FORK_SUCCESS_HPP - -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class on_fork_success_ : public initializer_base -{ -public: - explicit on_fork_success_(Handler handler) : handler_(handler) {} - - template - void on_fork_success(PosixExecutor &e) const - { - handler_(e); - } - -private: - Handler handler_; -}; - -template -on_fork_success_ on_fork_success(Handler handler) -{ - return on_fork_success_(handler); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/run_exe.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/run_exe.hpp deleted file mode 100644 index 6cceeea8c1..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/run_exe.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_RUN_EXE_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_RUN_EXE_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class run_exe_ : public initializer_base -{ -public: - explicit run_exe_(const std::string &s) : s_(s), cmd_line_(new char*[2]) - { - cmd_line_[0] = const_cast(s_.c_str()); - cmd_line_[1] = 0; - } - - template - void on_exec_setup(PosixExecutor &e) const - { - e.exe = s_.c_str(); - if (!e.cmd_line) - e.cmd_line = cmd_line_.get(); - } - -private: - std::string s_; - boost::shared_array cmd_line_; -}; - -inline run_exe_ run_exe(const char *s) -{ - return run_exe_(s); -} - -inline run_exe_ run_exe(const std::string &s) -{ - return run_exe_(s); -} - -inline run_exe_ run_exe(const boost::filesystem::path &p) -{ - return run_exe_(p.string()); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_args.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/set_args.hpp deleted file mode 100644 index 294926dc22..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_args.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_SET_ARGS_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_SET_ARGS_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class set_args_ : public initializer_base -{ -private: - static char *c_str(const std::string &s) - { - return const_cast(s.c_str()); - } - -public: - explicit set_args_(const Range &args) - { - args_.reset(new char*[args.size() + 1]); - boost::transform(args, args_.get(), c_str); - args_[args.size()] = 0; - } - - template - void on_exec_setup(PosixExecutor &e) const - { - e.cmd_line = args_.get(); - if (!e.exe && *args_[0]) - e.exe = args_[0]; - } - -private: - boost::shared_array args_; -}; - -template -set_args_ set_args(const Range &range) -{ - return set_args_(range); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_cmd_line.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/set_cmd_line.hpp deleted file mode 100644 index 0f59d25359..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_cmd_line.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_SET_CMD_LINE_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_SET_CMD_LINE_HPP - -#include -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class set_cmd_line : public initializer_base -{ -private: - static char *c_str(const std::string &s) - { - return const_cast(s.c_str()); - } - -public: - explicit set_cmd_line(const std::string &s) - { - typedef boost::tokenizer > tokenizer; - boost::escaped_list_separator sep('\\', ' ', '\"'); - tokenizer tok(s, sep); - args_.assign(tok.begin(), tok.end()); - cmd_line_.reset(new char*[args_.size() + 1]); - boost::transform(args_, cmd_line_.get(), c_str); - cmd_line_[args_.size()] = 0; - } - - template - void on_exec_setup(PosixExecutor &e) const - { - e.cmd_line = cmd_line_.get(); - } - -private: - std::vector args_; - boost::shared_array cmd_line_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_env.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/set_env.hpp deleted file mode 100644 index 76649184f3..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_env.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_SET_ENV_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_SET_ENV_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -template -class set_env_ : public initializer_base -{ -private: - static char *get_ptr(const std::string &s) - { - return const_cast(s.c_str()); - } - -public: - explicit set_env_(const Range &envs) : env_(new char*[envs.size() + 1]) - { - boost::transform(envs, env_.get(), get_ptr); - env_[envs.size()] = 0; - } - - template - void on_fork_setup(PosixExecutor &e) const - { - e.env = env_.get(); - } - -private: - boost::shared_array env_; -}; - -template -set_env_ set_env(const Range &envs) -{ - return set_env_(envs); -} - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_on_error.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/set_on_error.hpp deleted file mode 100644 index c01a816e60..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/set_on_error.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_SET_ON_ERROR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_SET_ON_ERROR_HPP - -#include -#include -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class set_on_error : public initializer_base -{ -public: - explicit set_on_error(boost::system::error_code &ec) : ec_(ec) {} - - template - void on_fork_setup(PosixExecutor&) const - { - if (::pipe(fds_) == -1) - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_); - if (::fcntl(fds_[1], F_SETFD, FD_CLOEXEC) == -1) - { - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_); - ::close(fds_[0]); - ::close(fds_[1]); - } - } - - template - void on_fork_error(PosixExecutor&) const - { - if (!ec_) - { - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec_); - ::close(fds_[0]); - ::close(fds_[1]); - } - } - - template - void on_fork_success(PosixExecutor&) const - { - if (!ec_) - { - ::close(fds_[1]); - int code; - if (::read(fds_[0], &code, sizeof(int)) > 0) - { - ec_ = boost::system::error_code(code, - boost::system::system_category()); - } - ::close(fds_[0]); - } - } - - template - void on_exec_setup(PosixExecutor&) const - { - if (!ec_) - { - ::close(fds_[0]); - } - } - - template - void on_exec_error(PosixExecutor&) const - { - if (!ec_) - { - int e = errno; - while (::write(fds_[1], &e, sizeof(int)) == -1 && errno == EINTR) - ; - ::close(fds_[1]); - } - } - -private: - boost::system::error_code &ec_; - mutable int fds_[2]; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/start_in_dir.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/start_in_dir.hpp deleted file mode 100644 index 187b5a31f4..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/start_in_dir.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_START_IN_DIR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_START_IN_DIR_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class start_in_dir : public initializer_base -{ -public: - explicit start_in_dir(const std::string &s) : s_(s) {} - - template - void on_exec_setup(PosixExecutor&) const - { - ::chdir(s_.c_str()); - } - -private: - std::string s_; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/initializers/throw_on_error.hpp b/plugins/New_GPG/src/include/boost/process/posix/initializers/throw_on_error.hpp deleted file mode 100644 index 7734c19e30..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/initializers/throw_on_error.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_INITIALIZERS_THROW_ON_ERROR_HPP -#define BOOST_PROCESS_POSIX_INITIALIZERS_THROW_ON_ERROR_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { namespace initializers { - -class throw_on_error : public initializer_base -{ -public: - template - void on_fork_setup(PosixExecutor&) const - { - if (::pipe(fds_) == -1) - BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("pipe(2) failed"); - if (::fcntl(fds_[1], F_SETFD, FD_CLOEXEC) == -1) - { - int e = errno; - ::close(fds_[0]); - ::close(fds_[1]); - BOOST_PROCESS_THROW(boost::system::system_error( - boost::system::error_code(e, boost::system::system_category()), - BOOST_PROCESS_SOURCE_LOCATION "fcntl(2) failed")); - } - } - - template - void on_fork_error(PosixExecutor&) const - { - int e = errno; - ::close(fds_[0]); - ::close(fds_[1]); - BOOST_PROCESS_THROW(boost::system::system_error( - boost::system::error_code(e, boost::system::system_category()), - BOOST_PROCESS_SOURCE_LOCATION "fork(2) failed")); - } - - template - void on_fork_success(PosixExecutor&) const - { - ::close(fds_[1]); - int code; - if (::read(fds_[0], &code, sizeof(int)) > 0) - { - ::close(fds_[0]); - BOOST_PROCESS_THROW(boost::system::system_error( - boost::system::error_code(code, - boost::system::system_category()), - BOOST_PROCESS_SOURCE_LOCATION "execve(2) failed")); - } - ::close(fds_[0]); - } - - template - void on_exec_setup(PosixExecutor&) const - { - ::close(fds_[0]); - } - - template - void on_exec_error(PosixExecutor&) const - { - int e = errno; - while (::write(fds_[1], &e, sizeof(int)) == -1 && errno == EINTR) - ; - ::close(fds_[1]); - } - -private: - mutable int fds_[2]; -}; - -}}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/pipe.hpp b/plugins/New_GPG/src/include/boost/process/posix/pipe.hpp deleted file mode 100644 index ca5b29447a..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/pipe.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_PIPE_HPP -#define BOOST_PROCESS_POSIX_PIPE_HPP - -namespace boost { namespace process { namespace posix { - -struct pipe -{ - int source; - int sink; - - pipe(int source, int sink) : source(source), sink(sink) {} -}; - -inline pipe make_pipe(int source, int sink) -{ - return pipe(source, sink); -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/search_path.hpp b/plugins/New_GPG/src/include/boost/process/posix/search_path.hpp deleted file mode 100644 index 6dc2bea063..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/search_path.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_SEARCH_PATH_HPP -#define BOOST_PROCESS_POSIX_SEARCH_PATH_HPP - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -inline std::string search_path(const std::string &filename, - std::string path = "") -{ - if (path.empty()) - { - path = ::getenv("PATH"); - if (path.empty()) - BOOST_PROCESS_THROW(std::runtime_error( - "Environment variable PATH not found")); - } - - std::string result; - typedef boost::tokenizer > tokenizer; - boost::char_separator sep(":"); - tokenizer tok(path, sep); - for (tokenizer::iterator it = tok.begin(); it != tok.end(); ++it) - { - boost::filesystem::path p = *it; - p /= filename; - if (!::access(p.c_str(), X_OK)) - { - result = p.string(); - break; - } - } - return result; -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/shell_path.hpp b/plugins/New_GPG/src/include/boost/process/posix/shell_path.hpp deleted file mode 100644 index 3e21e75759..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/shell_path.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_SHELL_PATH_HPP -#define BOOST_PROCESS_POSIX_SHELL_PATH_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -inline boost::filesystem::path shell_path() -{ - return "/bin/sh"; -} - -inline boost::filesystem::path shell_path(boost::system::error_code &ec) -{ - ec.clear(); - return "/bin/sh"; -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/terminate.hpp b/plugins/New_GPG/src/include/boost/process/posix/terminate.hpp deleted file mode 100644 index 9be087df25..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/terminate.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_TERMINATE_HPP -#define BOOST_PROCESS_POSIX_TERMINATE_HPP - -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -template -void terminate(const Process &p) -{ - if (::kill(p.pid, SIGKILL) == -1) - BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("kill(2) failed"); -} - -template -void terminate(const Process &p, boost::system::error_code &ec) -{ - if (::kill(p.pid, SIGKILL) == -1) - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec); - else - ec.clear(); -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/posix/wait_for_exit.hpp b/plugins/New_GPG/src/include/boost/process/posix/wait_for_exit.hpp deleted file mode 100644 index d2b946c262..0000000000 --- a/plugins/New_GPG/src/include/boost/process/posix/wait_for_exit.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2006, 2007 Julio M. Merino Vidal -// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling -// Copyright (c) 2009 Boris Schaeling -// Copyright (c) 2010 Felipe Tanus, Boris Schaeling -// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROCESS_POSIX_WAIT_FOR_EXIT_HPP -#define BOOST_PROCESS_POSIX_WAIT_FOR_EXIT_HPP - -#include -#include -#include -#include - -namespace boost { namespace process { namespace posix { - -template -inline int wait_for_exit(const Process &p) -{ - pid_t ret; - int status; - do - { - ret = ::waitpid(p.pid, &status, 0); - } while ((ret == -1 && errno == EINTR) || (ret != -1 && !WIFEXITED(status))); - if (ret == -1) - BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("waitpid(2) failed"); - return status; -} - -template -inline int wait_for_exit(const Process &p, boost::system::error_code &ec) -{ - pid_t ret; - int status; - do - { - ret = ::waitpid(p.pid, &status, 0); - } while ((ret == -1 && errno == EINTR) || (ret != -1 && !WIFEXITED(status))); - if (ret == -1) - BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec); - else - ec.clear(); - return status; -} - -}}} - -#endif diff --git a/plugins/New_GPG/src/include/boost/process/windows/search_path.hpp b/plugins/New_GPG/src/include/boost/process/windows/search_path.hpp old mode 100644 new mode 100755 index 62bb5f2745..ceb9c6f7c2 --- a/plugins/New_GPG/src/include/boost/process/windows/search_path.hpp +++ b/plugins/New_GPG/src/include/boost/process/windows/search_path.hpp @@ -42,13 +42,13 @@ inline std::wstring search_path(const std::wstring &filename, { boost::filesystem::path p = *it; p /= filename; - boost::array extensions = - { L"", L".exe", L".com", L".bat" }; - for (boost::array::iterator it2 = extensions.begin(); + boost::array extensions = + { "", ".exe", ".com", ".bat" }; + for (boost::array::iterator it2 = extensions.begin(); it2 != extensions.end(); ++it2) { boost::filesystem::path p2 = p; - p2 += *it2; + p2 /= (std::string)*it2; boost::system::error_code ec; bool file = boost::filesystem::is_regular_file(p2, ec); if (!ec && file && -- cgit v1.2.3