Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is using "/dev/tty" and ttytype?

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
When I run the 'tbspace.sh' from the command line, it works fine. But when I use an application to call this script, it reports with an error:
------------------
Script for monitor 'tbspace' failed.
Error message: 'ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
'.
------------------
Anybody knows what this means?
What is /dev/tty is used for?
Thanks,
 
tty is the serial console (keyboard/screen) the vt100 (example).

Does your script read any user input?
 
No, it doesn't read any user input. It just runs by itself. That's why I don't understand what it complains about.
 
Hi pho01,

You get this error message when a script is expecting to run on a terminal rather than in the background.

/dev/tty is everyones tty - a special device that refers to the tty actually in use by a session.

Looks as if your script calls the stty command which, you probably know, is used to send control codes to the tty - stty is trying to control something that's not there. So your script may not be expecting any user input but it's trying to control a terminal in some way.

Have a look through your script, it may be that you can comment out the calls to stty and allow your script to run without errors. Careful though *smile* ...

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top