Path: clinet!santra!tut!enea!mcvax!seismo!rutgers!sri-spam!ames!sdcsvax!ucbvax!ucsfcgl!socrates.ucsf.edu!kneller
From: kneller@socrates.ucsf.edu (Don Kneller%Langridge)
Newsgroups: comp.sys.ibm.pc
Subject: Re: RSE.EXE
Keywords: oops
Message-ID: <10225@cgl.ucsf.EDU>
Date: 27 May 87 18:35:43 GMT
Sender: daemon@cgl.ucsf.edu
Reply-To: kneller@socrates.ucsf.edu.UUCP (Don Kneller)
Organization: UCSF Computer Graphics Lab
Lines: 23

Nothing like writing a 2-line program and getting 1 line wrong.  Here
is RSE.C again (Microsoft C v4.0 source).  The execvp line had &av[2].

/* RSE.C
 *	- redirect standard error to standard out and execute the command
 *	  passed on the command line.
 *
 *	eg.   rse cl -c foo.c > errs
 */
#include <stdio.h>

main(ac, av)
int	ac;
char	*av[];
{
	dup2(fileno(stdout), fileno(stderr));	/* ie. dup2(1, 2) */
	execvp(av[1], &av[1]);
}
-----
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller@cgl.ucsf.edu
BITNET:	kneller@ucsfcgl.BITNET
