From f5c19a7872b2d30e182ac047ced2534876fcdd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Sat, 11 Jan 2014 14:58:15 +0100 Subject: [PATCH] 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 --- ChangeLog.txt | 4 ++++ src/rtl/hbproces.c | 7 +++++++ 2 files changed, 11 insertions(+) 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 );