Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66920 - branches/release/tools/build/v2/engine/src
From: kbelco_at_[hidden]
Date: 2010-11-30 16:09:24


Author: noel_belcourt
Date: 2010-11-30 16:09:23 EST (Tue, 30 Nov 2010)
New Revision: 66920
URL: http://svn.boost.org/trac/boost/changeset/66920

Log:
Non-blocking file descriptors for un*x bjam.

Text files modified:
   branches/release/tools/build/v2/engine/src/execunix.c | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: branches/release/tools/build/v2/engine/src/execunix.c
==============================================================================
--- branches/release/tools/build/v2/engine/src/execunix.c (original)
+++ branches/release/tools/build/v2/engine/src/execunix.c 2010-11-30 16:09:23 EST (Tue, 30 Nov 2010)
@@ -258,6 +258,10 @@
     close( out[1] );
     close( err[1] );
 
+ /* set both file descriptors to non-blocking */
+ fcntl(out[0], F_SETFL, O_NONBLOCK);
+ fcntl(err[0], F_SETFL, O_NONBLOCK);
+
     /* child writes stdout to out[1], parent reads from out[0] */
     cmdtab[ slot ].fd[ OUT ] = out[0];
     cmdtab[ slot ].stream[ OUT ] = fdopen( cmdtab[ slot ].fd[ OUT ], "rb" );


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