2011-01-05 10:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/src/rtl/hbproces.c
    ! fixed hb_fsProcessExec() in DOS, OS2 and WinCE builds and 
      hb_fsProcessOpen() in OS2 builds to close handles open for
      stdin, stdout and stderr communication
This commit is contained in:
Przemyslaw Czerpak
2011-01-05 09:28:47 +00:00
parent cb51aed640
commit 2be18a9c27
2 changed files with 20 additions and 0 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-01-05 10:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbproces.c
! fixed hb_fsProcessExec() in DOS, OS2 and WinCE builds and
hb_fsProcessOpen() in OS2 builds to close handles open for
stdin, stdout and stderr communication
2011-01-04 16:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/hbxbp.hbx
! Auto-generated.

View File

@@ -355,11 +355,20 @@ static int hb_fsProcessExec( const char * pszFilename,
hb_fsSetIOError( iResult >= 0, 0 );
if( iStdIn != FS_ERROR )
{
dup2( iStdIn, 0 );
close( iStdIn );
}
if( iStdOut != FS_ERROR )
{
dup2( iStdOut, 1 );
close( iStdOut );
}
if( iStdErr != FS_ERROR )
{
dup2( iStdErr, 2 );
close( iStdErr );
}
hb_vmLock();
hb_freeArgs( argv );
@@ -729,8 +738,13 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFilename,
hb_freeArgs( argv );
dup2( hStdIn, 0 );
close( hStdIn );
dup2( hStdOut, 1 );
close( hStdOut );
dup2( hStdErr, 2 );
close( hStdErr );
if( pid < 0 )
fError = HB_TRUE;