🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.misc
Article #599

fflush(stdin) ???

#599
From: Ralf Over
Date: Thu, 25 Jan 1996 00:00
23 lines
1446 bytes
Hi!

A little program in 'C' under Linux makes trouble.

I have a little menu. Before asking the user to make a choice
I want to clear the stdin-buffer.

'fflush(stdin)' isn't defined,
'freopen("/dev/tty", "r", stdin)' seems to work, but my binary
has to work under 'setuid root' and seems to change the environment.

Any help? Maybe a Linux-FAQ can tell it, but where can I search?

Please answer via Mail!



-- 
Ciao, Ralf.  <rover@on-luebeck.de> <overV@ru.fh-luebeck.de>
 ||| Fragen zum ON e.V.: <info@on-luebeck.de> Gastlogin: +49-451-3909-777
 |||  Ralf Over <http://www.ON-Luebeck.DE/~rover> Voice: +49-451-7063432
/ | \  "Wer auf Werbung verzichtet, um Geld zu sparen, handelt
ATARI   wie jemand, der die Uhr anhaelt, um Zeit zu sparen."
Technical Details
Message-ID: <H.ekBL.dGNH6T3Qd2k@nephilim.ON-Luebeck.DE>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1103af,c3ee4fe67afce35e,start
X-Google-Attributes: gid1103af,public
X-Google-Thread: 102983,c3ee4fe67afce35e,start
X-Google-Attributes: gid102983,public
From: rover@nephilim.ON-Luebeck.DE (Ralf Over)
Subject: fflush(stdin) ???
Date: 1996/01/25
Message-ID: <H.ekBL.dGNH6T3Qd2k@nephilim.ON-Luebeck.DE>
X-Deja-AN: 137821071
followup-to: poster
content-type: text/plain; charset=us-ascii
x-software: HERMES GUS 1.14.37 Rev. 16 Apr 1994
organization: Privat Site: Offenes Netz e.V. +49-451-3909-777
mime-version: 1.0
reply-to: rover@nephilim.ON-Luebeck.DE
newsgroups: comp.os.linux.misc,aus.computers.linux