{ STDERR - Redirects stderr of child process to stdout } { AYM, 09/08/1994 } { URL: http://www.teaser.fr/~amajorel/stderr/ } { License: public domain } { Author: André Majorel } program stderr; {$M $800, $0, $0} uses dos; const clsz = 126; const aargsz = clsz - 6 - 1 - 1 - 1; var aargdat : string [ aargsz ]; var aargr : byte; begin if ( paramcount < 1 ) then halt ( 1 ); asm mov ah, 46h { Int $46 : duplicate handle #1 } mov bx, 1 { into handle #2. } mov cx, 2 int 21h end; aargdat := '/C'; for aargr := 1 to paramcount do aargdat := aargdat + ' ' + paramstr ( aargr ) ; exec ( getenv ( 'comspec' ), aargdat ); halt ( dosexitcode ); end.