home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!news
- From: urlichs@smurf.sub.org (Matthias Urlichs)
- Newsgroups: de.comp.os.unix
- Subject: Re: TIOCSTI ( ioctl / BSD4.3 )
- Date: 2 Jan 1993 01:16:24 +0100
- Organization: University of Karlsruhe, FRG
- Lines: 32
- Message-ID: <1i2msoINN3dm@smurf.sub.org>
- References: <C04s6w.31y@malihh.hanse.de>
- NNTP-Posting-Host: 127.0.0.1
-
- In de.comp.os.unix, article <C04s6w.31y@malihh.hanse.de>,
- root@malihh.hanse.de (Carsten Lutz) writes:
- >
- > #include <stdio.h>
- > #include <sys/ioctl.h>
- >
- > main() {
- > char c='a';
- >
- > ioctl(stdin, TIOCSTI, &c);
- > printf("%c\n", getchar());
- > }
- >
- > muesste nach meiner Auffassung also ein 'a' ausgeben. Tut es aber nicht,
- > der ioctl() bewirkt scheinbar gar nichts.
- >
- AUA!!!
-
- > Was mache ich falsch ?
- >
- "man ioctl". "man stdio". Ersetze "stdin" durch "0".
-
- Naechstes Mal teste bitte die Fehlermeldungen diverser Systemaufrufe --
- dein ioctl meldet -1 und setzt errno auf EBADF...
-
- --
- Rule of Accuracy:
- When working toward the solution of a problem it always helps you to
- know the answer.
- --
- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\
- Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany -- +49-721-9612521 \o)/
-