home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / de / comp / os / unix / 2583 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.3 KB  |  42 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf.sub.org!easix!umunk!udo
  2. From: udo@umunk.GUN.de (Udo Munk)
  3. Newsgroups: de.comp.os.unix
  4. Distribution: world
  5. Subject: Re: TIOCSTI ( ioctl / BSD4.3 )
  6. X-Newsreader: TIN [version 1.1 PL8]
  7. References: <1i2msoINN3dm@smurf.sub.org>
  8. Message-ID: <930102624@umunk.GUN.de>
  9. Organization: Udo Munk's private BBS
  10. Date: Sat,  2 Jan 93 13:18:18 GMT
  11. Lines: 24
  12.  
  13. Matthias Urlichs (urlichs@smurf.sub.org) wrote:
  14. : In de.comp.os.unix, article <C04s6w.31y@malihh.hanse.de>,
  15. :   root@malihh.hanse.de (Carsten Lutz) writes:
  16. : > 
  17. : > #include <stdio.h>
  18. : > #include <sys/ioctl.h>
  19. : > 
  20. : > main() {
  21. : >   char c='a';
  22. : > 
  23. : >   ioctl(stdin, TIOCSTI, &c);
  24. : >   printf("%c\n", getchar());
  25. : > }
  26. : > 
  27. : > muesste nach meiner Auffassung also ein 'a' ausgeben. Tut es aber nicht,
  28. : > der ioctl() bewirkt scheinbar gar nichts.
  29. : > 
  30. : AUA!!!
  31.  
  32. : > Was mache ich falsch ?
  33. : > 
  34. : "man ioctl". "man stdio". Ersetze "stdin" durch "0".
  35.  
  36. Nein, ersetzte stdin bitte durch fileno(stdin).
  37. --
  38. Udo Munk, Oberstr. 21, 4040 Neuss 1, Germany
  39. udo@umunk.GUN.de   ...!{mcshh,smurf,unido}!easix!umunk!udo   CIS: 100021,2515
  40. uucp: +49 2131 278869 V22/32/42bis 8N1 login: uucp pwd: public MYNAME=bbsuser
  41. request file /usr/spool/uucppublic/info for instructions
  42.