X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fexternal%2Fprocess-cpp-minimal%2Finclude%2Fcore%2Fposix%2Fexec.h;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fexternal%2Fprocess-cpp-minimal%2Finclude%2Fcore%2Fposix%2Fexec.h;h=147e69fa6194a2df22d51f246e0ca3b5958ad6eb;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/external/process-cpp-minimal/include/core/posix/exec.h b/src/type3_AndroidCloud/anbox-master/external/process-cpp-minimal/include/core/posix/exec.h new file mode 100644 index 0000000..147e69f --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/external/process-cpp-minimal/include/core/posix/exec.h @@ -0,0 +1,68 @@ +/* + * Copyright © 2013 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * Authored by: Thomas Voß + */ + +#ifndef CORE_POSIX_EXEC_H_ +#define CORE_POSIX_EXEC_H_ + +#include +#include + +#include +#include +#include +#include + +namespace core +{ +namespace posix +{ +enum class RedirectFlags; + +/** + * @brief exec execve's the executable with the provided arguments and environment. + * @throws std::system_error in case of errors. + * @param fn The executable to run. + * @param argv Vector of command line arguments + * @param env Environment that the new process should run under + * @param flags Specifies which standard streams should be redirected. + * @return An instance of ChildProcess corresponding to the newly exec'd process. + */ +CORE_POSIX_DLL_PUBLIC ChildProcess exec(const std::string& fn, + const std::vector& argv, + const std::map& env, + const StandardStream& flags); + +/** + * @brief exec execve's the executable with the provided arguments and environment. + * @throws std::system_error in case of errors. + * @param fn The executable to run. + * @param argv Vector of command line arguments + * @param env Environment that the new process should run under + * @param flags Specifies which standard streams should be redirected. + * @param child_setup Function to run in the child just before exec(). + * @return An instance of ChildProcess corresponding to the newly exec'd process. + */ +CORE_POSIX_DLL_PUBLIC ChildProcess exec(const std::string& fn, + const std::vector& argv, + const std::map& env, + const StandardStream& flags, + const std::function& child_setup); +} +} + +#endif // CORE_POSIX_EXEC_H_