Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!frame!ciara!sbs From: sbs@ciara.Frame.COM (Steven Sargent) Newsgroups: comp.unix.wizards Subject: Re: dup2 Message-ID: <12407@frame.UUCP> Date: 20 Feb 91 12:58:38 GMT References: <27B1CA1C.22559@ics.uci.edu> <1991Feb8.002436.21328@usenet.ins.cwru.edu> <121729@uunet.UU.NET> Sender: news@frame.UUCP Reply-To: sbs@ciara.Frame.COM (Steven Sargent) Organization: Frame Technology Corp Lines: 11 dup2(old, new) { return dup(old+64, new); } ... depends on an undocumented interface; your mileage may vary; guaranteed to lose in SunOS 4.1 (but you can use real dup2 there); doubtless will lose other places that have wide u.u_ofile; but amusing nonetheless. -- Steven Sargent sbs@frame.com "Frame's phone bill, my opinions." Brought to you by Super Global Mega Corp .com