Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 May 1996 12:51:06 +1000 (EST)
From:      John Birrell <cimaxp1!jb@melb.werple.net.au>
To:        CS.Berkeley.EDU!jmacd@melb.werple.net.au (Josh MacDonald)
Cc:        atrad.adelaide.edu.au!msmith@melb.werple.net.au, uriah.heep.sax.de!joerg_wunsch@melb.werple.net.au, freebsd.org!freebsd-hackers@melb.werple.net.au
Subject:   Re: stdio problem
Message-ID:  <199605030250.MAA28269@melb.werple.net.au>
In-Reply-To: <199605030049.RAA18275@paris.CS.Berkeley.EDU> from "Josh MacDonald" at May 2, 96 05:49:57 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > > Why couldn't you all just answer my questions instead of telling me
> > > it is wrong.  Obviously, I already know that
> > > it doesn't work on FreeBSD or NetBSD, and that it works on every other
> > > operating system I've tried it on.

We routinely close stdin and re-assign the file descriptor under *both*
FreeBSD and NetBSD (i386 & alpha). We don't use freopen, so I can't 
comment on any bugs in that code. We close(fileno(stdin)) and then
fcntl(another_fd,F_DUPFD,fileno(stdin)) and this works fine. We use the
same code on OSF/1, HPUX, SCO, LynxOS, Motorola R3V5,6.

-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au                          119 Cecil Street
Ph  +61  3 9690 6900                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605030250.MAA28269>