Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64867 - sandbox/SOC/2010/process/boost/process
From: boris_at_[hidden]
Date: 2010-08-17 15:10:52


Author: bschaeling
Date: 2010-08-17 15:10:47 EDT (Tue, 17 Aug 2010)
New Revision: 64867
URL: http://svn.boost.org/trac/boost/changeset/64867

Log:
Removed call to non-async-signal-safe function between fork() and execve()
Text files modified:
   sandbox/SOC/2010/process/boost/process/operations.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: sandbox/SOC/2010/process/boost/process/operations.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/operations.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/operations.hpp 2010-08-17 15:10:47 EDT (Tue, 17 Aug 2010)
@@ -213,12 +213,14 @@
     std::pair<std::size_t, char**> envp =
         detail::environment_to_envp(ctx.env);
 
+ const char *work_dir = ctx.work_dir.c_str();
+
     pid_t pid = fork();
     if (pid == -1)
         BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("fork(2) failed");
     else if (pid == 0)
     {
- if (chdir(ctx.work_dir.c_str()) == -1)
+ if (chdir(work_dir) == -1)
         {
             write(STDERR_FILENO, "chdir() failed\n", 15);
             _exit(127);


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