home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / atari / st / tech / 4692 next >
Encoding:
Text File  |  1992-09-07  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!utcsri!torn!newshost.uwo.ca!uwovax.uwo.ca!7103_2622
  3. From: 7103_2622@uwovax.uwo.ca (Eric Smith)
  4. Subject: Re: LASER C PRINTING
  5. Organization: University of Western Ont, London
  6. Date: Fri, 4 Sep 1992 21:57:35 GMT
  7. Message-ID: <1992Sep4.175735.1@uwovax.uwo.ca>
  8. References: <1992Sep4.145336.4676@news.csuohio.edu>
  9. Sender: news@julian.uwo.ca (USENET News System)
  10. Nntp-Posting-Host: hydra.uwo.ca
  11. Lines: 26
  12.  
  13. In article <1992Sep4.145336.4676@news.csuohio.edu>, max@neumann.cba.csuohio.edu (Max Polk) writes:
  14. [ description of Laser C stdio setup deleted ]
  15.  
  16. > Even if you can manage to Fdup the console output and change the
  17. > association of stderr to it, programs executed with this in place won't
  18. > care about what you did, because only file descriptors 0 and 1 have
  19. > significance.
  20.  
  21. A clarification:
  22.  
  23. That's true for Laser C (with the default Laser C library) but not necessarily
  24. for other compilers/libraries. For example, the MiNT library and gcc library
  25. use handle 2 for stderr; they do this by checking to see if handle 2 is
  26. pointing at a terminal of some kind (by default this is true, since GEMDOS
  27. sets handle 2 to point at the serial port). If it is, then it is redirected
  28. to point at the console. If it is not (if someone has pointed handle 2
  29. at a file, for example) it's left alone.
  30.  
  31. For this reason, programs should not assume anything about handle 2 (e.g.
  32. it's better not to assume that it's pointing to the serial port). If
  33. you want to open the serial port, use the file name "AUX:". 
  34. --
  35. Eric R. Smith                     email:
  36. Dept. of Mathematics            eric.smith@uwo.ca
  37. University of Western Ontario
  38.  
  39.