- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Handling 'tty' messages in mail headers
Operating System - HP-UX
1748202
Members
2978
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2002 08:27 AM
тАО03-13-2002 08:27 AM
Hi all. I'm on a N-class w/UX-11.00
I get the following 'tty' related messages in my mail messages and am wondering how to strip them out without having any adverse effects on things. I'm thinking that they are effects from 'tty' lines in either /etc/profile or user ~/home/.profile files. Any advice on dealing with these would be helpful.
Thanks in advance,
i.e. messages in mail:
From root@nprod.mercermc.com ...
Date: ....
From: System <...>
Subject: cron
ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
You have mail.
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
I get the following 'tty' related messages in my mail messages and am wondering how to strip them out without having any adverse effects on things. I'm thinking that they are effects from 'tty' lines in either /etc/profile or user ~/home/.profile files. Any advice on dealing with these would be helpful.
Thanks in advance,
i.e. messages in mail:
From root@nprod.mercermc.com ...
Date: ....
From: System <...>
Subject: cron
ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
You have mail.
Not a terminal
stty: : Not a typewriter
stty: : Not a typewriter
Solved! Go to Solution.
- Tags:
- tty
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2002 11:06 AM
тАО03-13-2002 11:06 AM
Solution
Hi Jeffrey,
Good question - great name.
Your cron commands are "pulling" these msgs in as they spawn shells for execution.
See Clay's post from yesterday (Plan B):
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x21c20bce6f33d6118fff0090279cd0f9,00.html
Basically what you want to do is wrap a test for terminal around the commands in /etc/profile & ~user/home/.profile that are interactive & tset them
This would need to be done for any cron allowed user's .profile.
HTH,
Jeff
Good question - great name.
Your cron commands are "pulling" these msgs in as they spawn shells for execution.
See Clay's post from yesterday (Plan B):
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x21c20bce6f33d6118fff0090279cd0f9,00.html
Basically what you want to do is wrap a test for terminal around the commands in /etc/profile & ~user/home/.profile that are interactive & tset them
This would need to be done for any cron allowed user's .profile.
HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2002 02:53 AM
тАО03-14-2002 02:53 AM
Re: Handling 'tty' messages in mail headers
Hi
You can do this
Enclose the interactive term commands with if !
if ( { test -t 0 } ) then
`
stty
tabs
anymore
endif
{ test -t 0 }will return true or false,0 or 1 status depending upon whether the file descriptor is associated with a terminal device. If not a terminal then dont do the terminal based commands.
See the man page for the test command.
Steve Steel
You can do this
Enclose the interactive term commands with if !
if ( { test -t 0 } ) then
`
stty
tabs
anymore
endif
{ test -t 0 }will return true or false,0 or 1 status depending upon whether the file descriptor is associated with a terminal device. If not a terminal then dont do the terminal based commands.
See the man page for the test command.
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP