From df5488ccad435ae342b1329848da156a0f70cf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Tue, 15 Sep 2015 21:04:34 +0200 Subject: [PATCH] 2015-09-15 21:04 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/hbproces.c ! fixed test for broken pipe when only one pipe to child process is active in OS2 builds --- ChangeLog.txt | 5 +++++ src/rtl/hbproces.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9fb0037e11..606d653def 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-09-15 21:04 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/hbproces.c + ! fixed test for broken pipe when only one pipe to child process is + active in OS2 builds + 2015-09-15 14:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * include/hbvmpub.h * src/vm/hvm.c diff --git a/src/rtl/hbproces.c b/src/rtl/hbproces.c index 94040289cf..331d079fae 100644 --- a/src/rtl/hbproces.c +++ b/src/rtl/hbproces.c @@ -1312,7 +1312,7 @@ int hb_fsProcessRun( const char * pszFileName, nLen = hb_fsWriteLarge( hStdin, pStdInBuf, nStdInLen ); else nLen = hb_fsPipeWrite( hStdin, pStdInBuf, nStdInLen, nTimeOut ); - if( nLen == ( HB_SIZE ) FS_ERROR ) + if( nLen == ( HB_SIZE ) ( iPipeCount == 1 ? 0 : FS_ERROR ) ) { hb_fsClose( hStdin ); hStdin = FS_ERROR; @@ -1340,7 +1340,7 @@ int hb_fsProcessRun( const char * pszFileName, nLen = hb_fsReadLarge( hStdout, pOutBuf + nOutBuf, nOutSize - nOutBuf ); else nLen = hb_fsPipeRead( hStdout, pOutBuf + nOutBuf, nOutSize - nOutBuf, nTimeOut ); - if( nLen == ( HB_SIZE ) FS_ERROR ) + if( nLen == ( HB_SIZE ) ( iPipeCount == 1 ? 0 : FS_ERROR ) ) { hb_fsClose( hStdout ); hStdout = FS_ERROR; @@ -1367,7 +1367,7 @@ int hb_fsProcessRun( const char * pszFileName, nLen = hb_fsReadLarge( hStderr, pErrBuf + nErrBuf, nErrSize - nErrBuf ); else nLen = hb_fsPipeRead( hStderr, pErrBuf + nErrBuf, nErrSize - nErrBuf, nTimeOut ); - if( nLen == ( HB_SIZE ) FS_ERROR ) + if( nLen == ( HB_SIZE ) ( iPipeCount == 1 ? 0 : FS_ERROR ) ) { hb_fsClose( hStderr ); hStderr = FS_ERROR;