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