2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-17 13:42:14 +00:00

Non-blocking file descriptors for un*x bjam.

[SVN r66920]
This commit is contained in:
K. Noel Belcourt
2010-11-30 21:09:23 +00:00
parent 87ac2d6a08
commit 7bdb2d4ce2

View File

@@ -258,6 +258,10 @@ void exec_cmd
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" );