From: Jim Nance <jlnance@avanticorp.com>
Subject: Re: fclose() (fwd)
Date: Tue, 18 Feb 1997 07:21:34 -0500 (EST) [thread overview]
Message-ID: <ef60af2d86e5d45d0dd43e9c178c1154.axp-list@archive.invalid> (raw)
In-Reply-To: <9702171536.ZM1175@davros.bwh.com>
> Yeech! I wonder what it does with three potential file *'s. That downright
> sucks; it's nice that they keep their FILE *'s in a stack
I just checked and Linux and Digital Unix both do the same thing. Heres
the program:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int i;
for(i=0; i<3; i++) {
FILE *f = fopen("/dev/null","r");
printf("f = %x\n", f);
fclose(f);
}
return 0;
}
and here is the Linux output:
jlnance-pc> a.out
f = 8049650
f = 8049650
f = 8049650
Jim
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
next parent reply other threads:[~1997-02-18 12:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9702171536.ZM1175@davros.bwh.com>
1997-02-18 12:21 ` Jim Nance [this message]
1997-02-22 1:02 fclose() (fwd) Eric Smith
[not found] <gaf@zk3.dec.com>
1997-02-21 4:59 ` Bryan W. Headley
[not found] <9702181221.AA02768@halfpint.rtp.avanticorp.com>
1997-02-18 16:14 ` Jerry Feldman
-- strict thread matches above, loose matches on Subject: below --
1997-02-17 22:55 Stephen Williams
[not found] <jlnance@avanticorp.com>
1997-02-17 21:36 ` Bryan W. Headley
1997-02-17 21:18 Jim Nance
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox