Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64546 - in sandbox/SOC/2010/process: boost/process libs/process/test
From: boris_at_[hidden]
Date: 2010-08-02 12:41:59


Author: bschaeling
Date: 2010-08-02 12:41:58 EDT (Mon, 02 Aug 2010)
New Revision: 64546
URL: http://svn.boost.org/trac/boost/changeset/64546

Log:
Fixed bug in named pipe
Text files modified:
   sandbox/SOC/2010/process/boost/process/stream_behavior.hpp | 7 ++++---
   sandbox/SOC/2010/process/libs/process/test/child.cpp | 2 +-
   2 files changed, 5 insertions(+), 4 deletions(-)

Modified: sandbox/SOC/2010/process/boost/process/stream_behavior.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/stream_behavior.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/stream_behavior.hpp 2010-08-02 12:41:58 EDT (Mon, 02 Aug 2010)
@@ -210,7 +210,7 @@
 
         if (mkfifo(s.c_str(), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) == -1)
             BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("mkfifo(3) failed");
- child_end_ = open(s.c_str(), O_RDONLY);
+ child_end_ = open(s.c_str(), O_RDONLY | O_NONBLOCK);
         if (!child_end_.valid())
             BOOST_PROCESS_THROW_LAST_SYSTEM_ERROR("open(2) failed");
         parent_end_ = open(s.c_str(), O_WRONLY);
@@ -281,9 +281,10 @@
 #endif
     }
 
- static boost::shared_ptr<named_pipe> create(stream_type stream)
+ static boost::shared_ptr<named_pipe> create(stream_type stream,
+ std::string *name = 0)
     {
- return boost::make_shared<named_pipe>(named_pipe(stream));
+ return boost::make_shared<named_pipe>(named_pipe(stream, name));
     }
 
     handle get_child_end()

Modified: sandbox/SOC/2010/process/libs/process/test/child.cpp
==============================================================================
--- sandbox/SOC/2010/process/libs/process/test/child.cpp (original)
+++ sandbox/SOC/2010/process/libs/process/test/child.cpp 2010-08-02 12:41:58 EDT (Mon, 02 Aug 2010)
@@ -442,7 +442,7 @@
     std::size_t bytes_transferred)
 {
     BOOST_REQUIRE_EQUAL(ec, boost::system::error_code());
- BOOST_CHECK_EQUAL(bytes_transferred, 4);
+ BOOST_CHECK_EQUAL(bytes_transferred, 4u);
 }
 
 void read_handler(const boost::system::error_code &ec,


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