www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/20/00:20:51

From: fredex AT fcshome DOT stoneham DOT ma DOT us
Message-Id: <199609192338.TAA01273@fcshome.stoneham.ma.us>
Subject: Re: Distributing redir.exe
To: alex AT zool DOT unizh DOT ch (Alex Schroeder)
Date: Thu, 19 Sep 1996 19:38:55 -0400 (EDT)
Cc: djgpp AT delorie DOT com
In-Reply-To: <51r9lv$an1@rzunews.unizh.ch> from "Alex Schroeder" at Sep 19, 96 11:09:51 am

Thinking furiously, Alex Schroeder wrote:
> 
> Somebody I know would like to distribute redir.exe with a program of his
> (totally djgpp unrelated). This programm will be free, but w/o source 
> code (I think). Must his programm be distributed under GPL for it to 
> include redir.exe?
> 
> Alex.


If you can't use that one, here's a real cheap one you CAN use. To be
honest, I don't remember where I got it (might even have written it
myself, for all I can remember), but it's got no ownership legends in it
so feel free to use it as you see fit. Further, not that it's not nearly
as flexible as the one with DJGPP, as all it does is channel stderr into
the same place as stdout. But it works.


#include <stdio.h>

main (int argc, char ** argv)
	{
	dup2 (fileno (stdout), fileno (stderr));
	execvp (argv[1], argv + 1);
	}

-- 
-------------------------------------------------------------------------------
 .----    Fred Smith    /                        Office: fred AT computrition DOT com 
( /__  ,__.   __   __ /  __   : /                                 508-663-2524 
 /    /  /   /__) /  /  /__) .+'           Home: fredex AT fcshome DOT stoneham DOT ma DOT us 
/    /  (__ (___ (__(_ (___ / :__                                 617-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019