From c020913cb8928d767fc9849b58b8c817b2577a7f Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Thu, 3 Jul 2014 09:30:50 -0400 Subject: [PATCH] Make process::exec take an 'int' for the bitmask of launch options instead of an enum to make it more clear that it's a bitmask (and avoid a cast) --- include/fc/interprocess/iprocess.hpp | 2 +- include/fc/interprocess/process.hpp | 2 +- src/interprocess/process.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fc/interprocess/iprocess.hpp b/include/fc/interprocess/iprocess.hpp index 0f8671e..c7f8c4e 100644 --- a/include/fc/interprocess/iprocess.hpp +++ b/include/fc/interprocess/iprocess.hpp @@ -32,7 +32,7 @@ namespace fc * @return *this */ virtual iprocess& exec( const path& exe, std::vector args, - const path& work_dir = path(), exec_opts opts = open_all ) = 0; + const path& work_dir = path(), int opts = open_all ) = 0; /** * @return blocks until the process exits diff --git a/include/fc/interprocess/process.hpp b/include/fc/interprocess/process.hpp index 28333ef..777c154 100644 --- a/include/fc/interprocess/process.hpp +++ b/include/fc/interprocess/process.hpp @@ -18,7 +18,7 @@ namespace fc { virtual iprocess& exec( const fc::path& exe, std::vector args, const fc::path& work_dir = fc::path(), - exec_opts opts = open_all ); + int opts = open_all ); virtual int result(const microseconds& timeout = microseconds::maximum()); diff --git a/src/interprocess/process.cpp b/src/interprocess/process.cpp index 5504138..026c120 100644 --- a/src/interprocess/process.cpp +++ b/src/interprocess/process.cpp @@ -74,7 +74,7 @@ process::~process(){} iprocess& process::exec( const fc::path& exe, std::vector args, - const fc::path& work_dir, exec_opts opt ) + const fc::path& work_dir, int opt ) { my->pctx.work_dir = work_dir.string();