diff --git a/ChangeLog.txt b/ChangeLog.txt index d31ed6f5fb..0474ae59ac 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-01-11 14:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/hbproces.c + ! clear inheritance flag for second side of pipes passed to child process + 2014-01-10 11:07 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * include/hbatomic.h * for GCC >= 4.1 (except MinGW) use build-in GCC __sync_*() atomic diff --git a/src/rtl/hbproces.c b/src/rtl/hbproces.c index f8f39796ca..d9b6888310 100644 --- a/src/rtl/hbproces.c +++ b/src/rtl/hbproces.c @@ -425,6 +425,13 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFilename, DWORD dwFlags = 0; LPTSTR lpCommand = HB_CHARDUP( pszFilename ); + if( phStdin != NULL ) + SetHandleInformation( ( HANDLE ) hb_fsGetOsHandle( hPipeIn [ 1 ] ), HANDLE_FLAG_INHERIT, 0 ); + if( phStdout != NULL ) + SetHandleInformation( ( HANDLE ) hb_fsGetOsHandle( hPipeOut[ 0 ] ), HANDLE_FLAG_INHERIT, 0 ); + if( phStderr != NULL && phStdout != phStderr ) + SetHandleInformation( ( HANDLE ) hb_fsGetOsHandle( hPipeErr[ 0 ] ), HANDLE_FLAG_INHERIT, 0 ); + memset( &pi, 0, sizeof( pi ) ); memset( &si, 0, sizeof( si ) ); si.cb = sizeof( si );