home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mips / 882 < prev    next >
Encoding:
Text File  |  1992-08-16  |  1.9 KB  |  52 lines

  1. Newsgroups: comp.sys.mips
  2. Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!cxbne!phil
  3. From: phil@cxbne.cx.OZ.AU (Phil Chadwick)
  4. Subject: Re: Purpose of /dev/tty ??
  5. Organization: Comperex Australia Pty Limited
  6. Date: Mon, 17 Aug 1992 07:24:50 GMT
  7. Message-ID: <1992Aug17.072450.3677@cxbne.cx.OZ.AU>
  8. References: <1992Aug13.075420.15847@fawlty.towers.oz.au>
  9. Keywords: /dev/tty
  10. Lines: 40
  11.  
  12. stuart@fawlty.towers.oz.au (Stuart Walker) writes:
  13.  
  14. >I have just been having some fun and games trying to run multivol from within
  15. >a cron command.  I know that multivol is no longer required for cpio over
  16. >multiple volumes, but, for historical reasons, we must continue with this
  17. >command in the short term.  Anyway...
  18.  
  19. >The problem is that when run from cron, it is unable to open /dev/tty.
  20. >Now I have managed to get around this by recreating /dev/tty to have the
  21. >same major and minor device numbers as /dev/console.
  22.  
  23. >Could someone please inform me as to the purpose of /dev/tty, and whether
  24. >my method of getting around the problem is safe ??
  25.  
  26. >Is /dev/tty left over from the days when a teletype hung off the system
  27. >printing out various messages ??
  28.  
  29. The major and minor device codes of /dev/tty identify it as
  30. a "software" device, whose output and input are directed by the
  31. UNIX kernel respectively to and from the "controlling terminal"
  32. of the process performing the I/O.
  33.  
  34. Jobs started by cron don't have a controlling terminal.
  35.  
  36. Multivol is behaving as an "interactive only" application.
  37. i.e. it wants a controlling terminal.
  38.  
  39. The fix is to either run multivol interactively or modify it
  40. to work in the absence of a controlling terminal.
  41.  
  42. You should put /dev/tty back the way it was - a lot of programs
  43. are going to break otherwise.
  44.  
  45.  
  46. Phil
  47. --
  48. Email:  phil@cxbne.cx.oz.au        ,-_|\
  49. Phone:  +61 7 252 3788            /     *                     Phil Chadwick
  50. Fax:    +61 7 257 1480            \_,-._/        Manager, Comperex Networks
  51.                                        v
  52.