|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64284 - sandbox/SOC/2010/process/boost/process/detail
From: boris_at_[hidden]
Date: 2010-07-23 04:09:06
Author: bschaeling
Date: 2010-07-23 04:09:02 EDT (Fri, 23 Jul 2010)
New Revision: 64284
URL: http://svn.boost.org/trac/boost/changeset/64284
Log:
Minor update
Text files modified:
sandbox/SOC/2010/process/boost/process/detail/basic_status_service.hpp | 21 +++++++++++++--------
sandbox/SOC/2010/process/boost/process/detail/posix_helpers.hpp | 13 -------------
sandbox/SOC/2010/process/boost/process/detail/status_impl.hpp | 2 +-
3 files changed, 14 insertions(+), 22 deletions(-)
Modified: sandbox/SOC/2010/process/boost/process/detail/basic_status_service.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/detail/basic_status_service.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/detail/basic_status_service.hpp 2010-07-23 04:09:02 EDT (Fri, 23 Jul 2010)
@@ -94,7 +94,8 @@
void destroy(implementation_type &impl)
{
boost::unique_lock<boost::mutex> lock(work_thread_mutex_);
- typename ::std::vector<implementation_type>::iterator it = std::find(impls_.begin(), impls_.end(), impl);
+ typename std::vector<implementation_type>::iterator it =
+ std::find(impls_.begin(), impls_.end(), impl);
if (it != impls_.end())
impls_.erase(it);
impl.reset();
@@ -157,13 +158,15 @@
else
{
boost::unique_lock<boost::mutex> lock(work_thread_mutex_);
- for (typename std::vector<implementation_type>::iterator it = impls_.begin(); it != impls_.end(); ++it)
+ for (typename std::vector<implementation_type>::iterator it =
+ impls_.begin(); it != impls_.end(); ++it)
(*it)->complete(pid, status);
if (--pids_ == 0)
work_.reset();
}
#elif defined(BOOST_WINDOWS_API)
- DWORD res = WaitForMultipleObjects(handles_.size(), &handles_[0], FALSE, INFINITE);
+ DWORD res = WaitForMultipleObjects(handles_.size(), &handles_[0],
+ FALSE, INFINITE);
if (res == WAIT_FAILED)
BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("WaitForMultipleObjects() failed");
else if (res - WAIT_OBJECT_0 == 0)
@@ -181,7 +184,8 @@
if (!GetExitCodeProcess(handle, &exit_code))
BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("GetExitCodeProcess() failed");
boost::unique_lock<boost::mutex> lock(work_thread_mutex_);
- for (std::vector<implementation_type>::iterator it = impls_.begin(); it != impls_.end(); ++it)
+ for (std::vector<implementation_type>::iterator it =
+ impls_.begin(); it != impls_.end(); ++it)
(*it)->complete(handle, exit_code);
std::vector<HANDLE>::iterator it = handles_.begin();
std::advance(it, res - WAIT_OBJECT_0);
@@ -196,12 +200,13 @@
void interrupt_work_thread()
{
#if defined(BOOST_POSIX_API)
- // By creating a child process which immediately exits we interrupt wait().
+ // By creating a child process which immediately exits
+ // we interrupt wait().
interrupt_pid_ = create_child("/usr/sh").get_id();
-
#elif defined(BOOST_WINDOWS_API)
- // By signaling the event in the first slot WaitForMultipleObjects() will return.
- // The work thread won't do anything except checking if it should continue to run.
+ // By signaling the event in the first slot WaitForMultipleObjects()
+ // will return. The work thread won't do anything except checking if
+ // it should continue to run.
if (!SetEvent(handles_[0]))
BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("SetEvent() failed");
#endif
Modified: sandbox/SOC/2010/process/boost/process/detail/posix_helpers.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/detail/posix_helpers.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/detail/posix_helpers.hpp 2010-07-23 04:09:02 EDT (Fri, 23 Jul 2010)
@@ -100,17 +100,4 @@
}
}
-/*
- * posix_remap helper function
- *
- * Given a native and other handle, it changes the native for the other.
- * It simply uses dup2 POSIX function and trow an error when needed.
- *
- */
-
-void posix_remap(int native_handle, int new_handle)
-{
- if (::dup2(new_handle, native_handle) == -1)
- BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("dup2() failed");
-}
#endif
Modified: sandbox/SOC/2010/process/boost/process/detail/status_impl.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/detail/status_impl.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/detail/status_impl.hpp 2010-07-23 04:09:02 EDT (Fri, 23 Jul 2010)
@@ -75,7 +75,7 @@
class status_impl
{
public:
- int wait(pid_type pid, boost::system::system_error ec)
+ int wait(pid_type pid, boost::system::error_code &ec)
{
#if defined(BOOST_POSIX_API)
pid_t p;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk