Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #297

Re: How to dup a FILE*

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!newsfeed2.sbs.de!nntp.fujitsu-siemens.com!not-for-mail
From Josef Moellers <josef.moellers@ts.fujitsu.com>
Newsgroups comp.os.linux.development.apps
Subject Re: How to dup a FILE*
Date Tue, 06 Dec 2011 16:57:02 +0100
Organization Fujitsu Technology Solutions
Lines 23
Message-ID <jble0e$afq$1@nntp.ts.fujitsu.com> (permalink)
References <jbkl2v$a75$1@nntp.ts.fujitsu.com> <jbl59m$upm$1@reversiblemaps.ath.cx>
NNTP-Posting-Host 172.25.253.16
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace nntp.ts.fujitsu.com 1323187022 10746 172.25.253.16 (6 Dec 2011 15:57:02 GMT)
X-Complaints-To abuse@sbs.de
NNTP-Posting-Date Tue, 6 Dec 2011 15:57:02 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
In-Reply-To <jbl59m$upm$1@reversiblemaps.ath.cx>
X-Enigmail-Version 1.1.1
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:297

Show key headers only | View raw


Am 6.12.2011 schrub Jasen Betts:

> On 2011-12-06, Josef Moellers <josef.moellers@ts.fujitsu.com> wrote:
> 
>> fflush(stderr);
>> fclose(stderr);
> 
>> dup2(oldfd2, fileno(stderr));	/* this may not work, see below */
> 
> read the man page for fclose: you can't do anything (useful) with stderr after
> fclose(stderr).
> 
That's what I tought, hence my remark.

I have now implemented Richard's idea, as I understood it (just change
fd2 underneth stderr).

Josef
-- 
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to dup a FILE* Josef Moellers <josef.moellers@ts.fujitsu.com> - 2011-12-06 09:51 +0100
  Re: How to dup a FILE* Richard Kettlewell <rjk@greenend.org.uk> - 2011-12-06 09:16 +0000
    Re: How to dup a FILE* Josef Moellers <josef.moellers@ts.fujitsu.com> - 2011-12-06 10:41 +0100
  Re: How to dup a FILE* Jasen Betts <jasen@xnet.co.nz> - 2011-12-06 13:28 +0000
    Re: How to dup a FILE* Josef Moellers <josef.moellers@ts.fujitsu.com> - 2011-12-06 16:57 +0100
  Re: How to dup a FILE* David W Noon <dwnoon@spamtrap.ntlworld.com> - 2011-12-06 19:53 +0000
    Re: How to dup a FILE* Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-12-06 20:38 +0000
      Re: How to dup a FILE* Richard Kettlewell <rjk@greenend.org.uk> - 2011-12-06 22:03 +0000
      Re: How to dup a FILE* David W Noon <dwnoon@spamtrap.ntlworld.com> - 2011-12-06 21:46 +0000
        Re: How to dup a FILE* Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-12-07 17:52 +0000

csiph-web